Message66401
Rejecting this patch which simply disables a feature that some users
consider to be important.
I will look at it further. Right now, I'm inclined to simply document
that the three temporary autoconversions deny meaningful
contemporaneous access to a set used as a key.
The set_swap_bodies() function itself is fine -- it behaves just like
an atomic version of the pure python sequence: t=set(a); a.clear();
a.update(b); b.clear(); b.update(t); del t.
The issue is simply that the swap/search/swap dance allows the
possibility that a determined user could graft onto the search step and
access but not modify the temporary swapped-in frozenset. It doesn't
crash; it simply produces an undefined result. I'm not losing sleep
over this scenario.
I'm am entertaining an alternative where contains/discard/remove would
duplicate instead of swap the set bodies; however, that approach may do
more harm than good. |
|
| Date |
User |
Action |
Args |
| 2008-05-08 04:06:42 | rhettinger | set | spambayes_score: 0.0357832 -> 0.0357832 recipients:
+ rhettinger, Rhamphoryncus |
| 2008-05-08 04:06:42 | rhettinger | set | spambayes_score: 0.0357832 -> 0.0357832 messageid: <1210219602.12.0.61405935643.issue2778@psf.upfronthosting.co.za> |
| 2008-05-08 04:06:41 | rhettinger | link | issue2778 messages |
| 2008-05-08 04:06:40 | rhettinger | create | |
|