Charles-François Natali added the comment:
No, there's a bug in your code:
"""
nest_variables(collections.OrderedDict({'foo.bar': '1', 'foo': '2'}))
"""
You pass the OrderedDict *and already constructed dict*, so entries are
inserted in a random order.
Just use this and it'll work properly:
"""
nest_variables(collections.OrderedDict(('foo.bar', '1'), ('foo', '2')))
"""
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16816>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com