[Python-Dev] slightly inconsistent set/list pop behaviour (original) (raw)
Mark Dickinson dickinsm at gmail.com
Wed Apr 8 08:44:35 CEST 2009
- Previous message: [Python-Dev] slightly inconsistent set/list pop behaviour
- Next message: [Python-Dev] slightly inconsistent set/list pop behaviour
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Apr 8, 2009 at 7:13 AM, John Barham <jbarham at gmail.com> wrote:
If you play around a bit it becomes clear that what set.pop() returns is independent of the insertion order:
It might look like that, but I don't think this is true in general (at least, with the current implementation):
foo = set([1, 65537]) foo.pop() 1 foo = set([65537, 1]) foo.pop() 65537
Mark
- Previous message: [Python-Dev] slightly inconsistent set/list pop behaviour
- Next message: [Python-Dev] slightly inconsistent set/list pop behaviour
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]