Message39494
Logged In: YES
user_id=80475
Here is a revised patch for D.pop() with hard tabs and
corrected reference counts. In a DEBUG build, I validated
the ref counts against equivalent steps: vv=d[k]; del d[k].
And, after Tim's suggestions, the code is fast and light.
In addition to d.pop(k), GvR's patch for d.popitem(k)
should also go in. The (k,v) return value feeds directly
into d.__setitem__ or a dict(itemlist) constructor (see the
code fragments in the 4/6/02 post). The only downside is
the time to process METH_VARARGS.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:12:06 | admin | link | issue539949 messages |
2007-08-23 15:12:06 | admin | create | |
|