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 Trundle
Recipients Trundle, omatt
Date 2009-10-04.08:57:01
SpamBayes Score 0.00012360355
Marked as misclassified No
Message-id <1254646622.82.0.899960860781.issue7053@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2009-10-04 08:57:02Trundlesetrecipients: + Trundle, omatt
2009-10-04 08:57:02Trundlesetmessageid: <1254646622.82.0.899960860781.issue7053@psf.upfronthosting.co.za>
2009-10-04 08:57:01Trundlelinkissue7053 messages
2009-10-04 08:57:01Trundlecreate