Re: pop method question
- From: aleax@xxxxxxx (Alex Martelli)
- Date: Sat, 3 Mar 2007 18:18:50 -0800
Steven D'Aprano <steve@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
...
while some_dict:
do_something_with(some_dict.pop())
doesn't work. Instead you have to write this:
You have to use .popitem for this -- that's what's it's for...
Alex
.
- References:
- pop method question
- From: Nicholas Parsons
- Re: pop method question
- From: Paul Rubin
- Re: pop method question
- From: Nicholas Parsons
- Re: pop method question
- From: Steven D'Aprano
- pop method question
- Prev by Date: Re: class attrdict
- Next by Date: Re: pop method question
- Previous by thread: Re: pop method question
- Next by thread: Re: pop method question
- Index(es):