[issue44703] deepcopy(frozenset()) returns a new object

Raymond Hettinger report at bugs.python.org
Wed Jul 21 19:44:16 EDT 2021


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Returning the same object is just a micro-optimization and we've decided that it isn't worth it.  In bpo-40521, frozenset() stop being a singleton.  This costs a small bit of space but saves code complexity and a bit of execution time (especially given that we no longer have cheap access to global state).

Thanks for the suggestion, but we'll pass.

----------
nosy: +rhettinger
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list