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 stutzbach
Recipients stutzbach
Date 2010-05-18.15:21:10
SpamBayes Score 6.0501785e-05
Marked as misclassified No
Message-id <>
For operations that test membership in a set, Python coerces sets and subclasses of set into a temporary frozenset before testing membership.

For example, this works:

>>> set() in set([frozenset()])

Although the set() is not hashable itself, Python creates a temporary frozenset() out of the set().  It should do the same for user-types derived from collections.Set, so they can inter-operate in the same way.

In setobject.c, the following methods behave in the described manner: set_contains, set_remove, and set_discard.
Date User Action Args
2010-05-18 15:21:12stutzbachsetrecipients: + stutzbach
2010-05-18 15:21:12stutzbachsetmessageid: <>
2010-05-18 15:21:11stutzbachlinkissue8752 messages
2010-05-18 15:21:10stutzbachcreate