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 rhettinger
Recipients
Date 2002-04-09.13:39:08
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.

History
Date User Action Args
2007-08-23 15:12:06adminlinkissue539949 messages
2007-08-23 15:12:06admincreate