Message185606
Consider:
```python
class A(object):
def __init__(self):
self.r = iter(range(5))
def __iter__(self):
return self
@property
def next(self):
return next(self.r)
```
The `next` method is a property, however:
```python
from collections import Iterator
a = A()
isinstance(a, Iterator) # True
next(a) # TypeError: 'int' object is not callable
``` |
|
Date |
User |
Action |
Args |
2013-03-31 02:45:46 | bruth | set | recipients:
+ bruth |
2013-03-31 02:45:46 | bruth | set | messageid: <1364697946.01.0.0961025821714.issue17584@psf.upfronthosting.co.za> |
2013-03-31 02:45:45 | bruth | link | issue17584 messages |
2013-03-31 02:45:45 | bruth | create | |
|