[New-bugs-announce] [issue19026] OrderedDict should not accept dict as parameter
anatoly techtonik
report at bugs.python.org
Sun Sep 15 18:46:03 CEST 2013
New submission from anatoly techtonik:
http://stackoverflow.com/questions/15733558/python-ordereddict-not-keeping-element-order
I wonder why OrderedDict accepts dict as parameter in a first place? OD is used when order is important and if plain dict is supplied, the order is lost.
>>> d = {3:4, 1:2}
>>> OD(d)
OrderedDict([(1, 2), (3, 4)])
OrderedDict should not accept dict as parameter.
----------
components: Library (Lib)
messages: 197787
nosy: techtonik
priority: normal
severity: normal
status: open
title: OrderedDict should not accept dict as parameter
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19026>
_______________________________________
More information about the New-bugs-announce
mailing list