[New-bugs-announce] [issue35864] Replace OrderedDict with regular dict in namedtuple's _asdict() method.
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
components: Library (Lib)
title: Replace OrderedDict with regular dict in namedtuple's _asdict() method.
versions: Python 3.8
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce