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 ereuveni
Recipients ereuveni
Date 2015-04-27.21:42:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430170966.34.0.831827810985.issue24067@psf.upfronthosting.co.za>
In-reply-to
Content
Calling weakref.proxy() on an object returns something that is an instance of collections.Iterator, regardless of whether the object is an instance of collections.Iterator or even if the object itself is iterable.

To reproduce, run the following code (verified in python2.7 and 3.4 on my Mac):

import collections
import weakref

class NotIterator:
    pass

not_iterator = NotIterator()
isinstance(not_iterator, collections.Iterator) # returns False

proxy_object = weakref.proxy(not_iterator)
isinstance(proxy_object, collections.Iterator) # returns True, should be False
History
Date User Action Args
2015-04-27 21:42:46ereuvenisetrecipients: + ereuveni
2015-04-27 21:42:46ereuvenisetmessageid: <1430170966.34.0.831827810985.issue24067@psf.upfronthosting.co.za>
2015-04-27 21:42:46ereuvenilinkissue24067 messages
2015-04-27 21:42:46ereuvenicreate