[New-bugs-announce] [issue35864] Replace OrderedDict with regular dict in namedtuple's _asdict() method.

Raymond Hettinger report at bugs.python.org
Wed Jan 30 21:20:11 EST 2019


New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:

Now that regular dicts are ordered and compact, it makes more sense for the _asdict() method to create a regular dict (as it did in its early days) rather than an OrderedDict.  The regular dict is much smaller, much faster, and has a much cleaner looking repr. 

Historically we would go through a deprecation period for a possibly breaking change; however, it was considered more benefit to users and less disruptive to make the update directly.  See the thread starting at: https://mail.python.org/pipermail/python-dev/2019-January/156150.html

----------
assignee: rhettinger
components: Library (Lib)
messages: 334602
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Replace OrderedDict with regular dict in namedtuple's _asdict() method.
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35864>
_______________________________________


More information about the New-bugs-announce mailing list