Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:

After enhancing namedtuple and ConfigParser, I found a simpler approach
that doesn't involve extending the API.  The simple way is to use
ordered dictionaries directly.  

With a small tweak to OD's repr, it is fully substitutable for a dict
without changing any client code or doctests (the OD loses its own
eval/repr order-preserving roundtrip but what json already gives now).

See attached patch.

Added file: http://bugs.python.org/file13244/json_ordered.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5381>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to