2007/12/8, Raymond Hettinger <[EMAIL PROTECTED]>: >...the proposal adds new syntax without adding functionality.
That is indeed the definition of syntactic sugar [1]. Python is full of that, for example the import statement. 2007/12/8, Paul Svensson <[EMAIL PROTECTED]>: > What is the problem that is not solved by iter(()) ? 'yield iter(()).next()' it's obscure, you can't know its purpose at first sight. There are other alternatives but none of them seems to be the "obvious way to do it". But that is the less important problem. The real problem is that raising StopIteration is not orthogonal. It is confusing for the reasons I exposed. Generators are something in the middle between a language feature and a framework/library. With 'yield break' they will be completely a language feature. [1] http://en.wikipedia.org/wiki/Syntactic_sugar Manuel. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com