[Python-Dev] Proposal: add odict to collections (original) (raw)
Anthon van der Neut anthon at mnt.org
Mon Sep 1 14:24:27 CEST 2008
- Next message: [Python-Dev] Further PEP 8 compliance issues in threading and multiprocessing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sorry to pipe in so late, but this is actually the default behaviour of my C implementation (which I call KIO (Key Insertion Order), there is an option to change this to KVIO (Key (or) Value Insertion Order), which moves the pair to the end.
Anthon
Armin Ronacher wrote:
Steven D'Aprano <steve pearwood.info> writes:
Conceptually, I would expect the following behaviour:
od = odict() od[1] = 'spam' # insert a new key od[2] = 'parrot' # insert a new key od[1] = 'ham' # modify existing key od.items() [(1, 'ham'), (2, 'parrot')] That behavior is different to any ordered-dict implementation out there ;-) Regards, Armin
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/anthon%40mnt.org
- Next message: [Python-Dev] Further PEP 8 compliance issues in threading and multiprocessing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]