homepage

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 ezio.melotti
Recipients James.Paget, ezio.melotti
Date 2014年09月25日.17:41:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411666900.46.0.418927981054.issue22498@psf.upfronthosting.co.za>
In-reply-to
Content
This doesn't modify f, it replaces it with a new frozenset:
 >>> f = frozenset({1, 2})
 >>> f
 frozenset({1, 2})
 >>> id(f)
 3071990668
 >>> f -= frozenset({1})
 >>> f
 frozenset({2})
 >>> id(f)
 3066719340
Notice how the two ids are different.
In other words,
 f -= frozenset({1})
is equivalent to
 f = f - frozenset({1})
You get an error with += because
 f = f + frozenset({1})
is not a valid operation for (frozen)sets.
History
Date User Action Args
2014年09月25日 17:41:40ezio.melottisetrecipients: + ezio.melotti, James.Paget
2014年09月25日 17:41:40ezio.melottisetmessageid: <1411666900.46.0.418927981054.issue22498@psf.upfronthosting.co.za>
2014年09月25日 17:41:40ezio.melottilinkissue22498 messages
2014年09月25日 17:41:40ezio.melotticreate

AltStyle によって変換されたページ (->オリジナル) /