Alexey G. Shpagin <python-3000 <at> udmvt.ru> writes: > > Example will look like > g = (n for n in range(100) if n*n < 50 or else_break())
Please don't suggest any hack involving raising StopIteration as part of a conditional statement in a generator expression. It might work today, but it might as well break tomorrow as it's only a side-effect of the implementation, not an official property of the language. Regards Antoine. _______________________________________________ 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