Message194701
| Author |
py.user |
| Recipients |
docs@python, ezio.melotti, py.user, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy |
| Date |
2013年08月08日.17:45:26 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1375983926.78.0.0867551089755.issue18301@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
>>> import itertools
>>>
>>> class A(itertools.chain):
... def from_iter(arg):
... return A(iter(arg))
...
>>> class B(A):
... pass
...
>>> B('a', 'b')
<__main__.B object at 0x7f40116d7730>
>>> B.from_iter(['a', 'b'])
<__main__.A object at 0x7f40116d7780>
>>>
it should be B |
|