PEP 255: Simple Generators

Roman Suzi rnd at onego.ru
Thu Jun 21 02:43:56 EDT 2001


I've not been heard or commented. It seems that everybody is happy with
simple generators (and discuss syntax) while I am not.

I dare think that proposed gen/generator/def-yield thing is doomed to be
phased out in some future Python version, because it creates frozen
context for very narrow task of providing generators and in the future (I
hope) there will be normal parallel programming in Python, which will
solve the problem simply and efficiently.

I am not against PEP 255. The feature is cool. But it is a feature which
requires new keyword, new function class, etc. In one way or another, it
modifies function and it implicitely lead to the same syntax beasts
as in C++/Java/Pascal.

PEP 255 is not Pythonish enough. 

Let's better think about more general things like:
* co-routines (which "generator" is an example, if I understand it 
correctly)
* adding parallel programming paradigm (which is even better
for long term), where objects live their lifes and could serve
other objects as generators, gatherers, services, etc.

OOP was made easy by python. I hope parallel programming 
to be added and made equally easy, without all those
modifiers and zillion of new keywords and modifiers. 

Sincerely yours, Roman A.Suzi
-- 
 - Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
 





More information about the Python-list mailing list