[Python-ideas] Generators' and iterators' __add__ method
techtonik at gmail.com
Thu Feb 16 08:04:54 CET 2012
On Thu, Feb 16, 2012 at 4:46 AM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:
> On 16/02/12 05:20, Yuval Greenfield wrote:
>> Wouldn't it be nice to add generators and iterators like we can do with
>> for item in f() + g():
> No. Then every iterator would be expected to implement __add__,
> including all the ones already written.
> It would also clash with existing meanings of __add__ on some
> types, such as NumPy arrays.
Good example for Python Ideas FAQ.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas