This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author py.user
Recipients docs@python, ezio.melotti, py.user, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy
Date 2013-08-09.01:13:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376010837.17.0.322946398209.issue18301@psf.upfronthosting.co.za>
In-reply-to
Content
changed iter(arg) to *arg


>>> import itertools
>>> 
>>> class A(itertools.chain):
...     @classmethod
...     def from_iter(cls, arg):
...         return cls(*arg)
... 
>>> class B(A):
...     pass
... 
>>> B('ab', 'cd')
<__main__.B object at 0x7fc280e93cd0>
>>> b = B.from_iter(['ab', 'cd'])
>>> b
<__main__.B object at 0x7fc280e93d20>
>>> next(b)
'a'
>>> next(b)
'b'
>>> next(b)
'c'
>>> next(b)
'd'
>>> next(b)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
StopIteration
>>>
History
Date User Action Args
2013-08-09 01:13:57py.usersetrecipients: + py.user, rhettinger, terry.reedy, ezio.melotti, r.david.murray, docs@python, serhiy.storchaka
2013-08-09 01:13:57py.usersetmessageid: <1376010837.17.0.322946398209.issue18301@psf.upfronthosting.co.za>
2013-08-09 01:13:57py.userlinkissue18301 messages
2013-08-09 01:13:56py.usercreate