Trundle <andy-pyt...@hammerhartes.de> added the comment: This is defined behaviour and no bug at all. Special methods are looked up in the type for new-style classes and not in the instance. Try changing ``self.__iter__=self.__str__`` to ``test1.__iter__ = self.__str__`` in your example (which will then raise a TypeError on the second iteration).
---------- nosy: +Trundle _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7053> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com