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 Rhamphoryncus
Recipients Rhamphoryncus, rhettinger
Date 2008-05-14.22:11:51
SpamBayes Score 0.12460172
Marked as misclassified No
Message-id <1210803113.79.0.476970196183.issue2778@psf.upfronthosting.co.za>
In-reply-to
Content
There is no temporary hashability.  The hash value is calculated, but
never stored in the set's hash field, so it will never become out of
sync.  Modification while __hash__ or __eq__ is running is possible, but
for __eq__ that applies to any mutable type.

set_contains_key only has two callers, one for each value of the
treat_set_key_as_frozen argument, so I could inline it if you'd prefer that?

set_swap_bodies has only one remaining caller, which uses a normal set,
not a frozenset.  Using set_swap_bodies on a frozenset would be visible
except in a few special circumstances (ie it only contains builtin
types), so a sanity check against that seems appropriate.  The old code
reset ->hash to -1 in case one of the arguments was a frozenset -
impossible now, so I sanity check that it's always -1.
History
Date User Action Args
2008-05-14 22:11:54Rhamphoryncussetspambayes_score: 0.124602 -> 0.12460172
recipients: + Rhamphoryncus, rhettinger
2008-05-14 22:11:53Rhamphoryncussetspambayes_score: 0.124602 -> 0.124602
messageid: <1210803113.79.0.476970196183.issue2778@psf.upfronthosting.co.za>
2008-05-14 22:11:52Rhamphoryncuslinkissue2778 messages
2008-05-14 22:11:51Rhamphoryncuscreate