Stefan Rank schrieb:
> on 18.04.2007 07:39 Steven D'Aprano said the following:
>> I thought that an iterator was any object that follows the iterator
> 
> replace object with "instance of a class", i.e. the relevant methods are 
> looked up in the __class__ not in the instance (I think).
> I had the same troubles trying to dynamically reassign a __call__ method...

This is correct.

It's not properly documented though, and not applied consistently, e.g.
__enter__ and __exit__ are looked up in the instance itself.

Georg

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to