[issue15373] copy.copy() does not properly copy os.environment

R. David Murray report at bugs.python.org
Mon Jul 16 18:53:36 CEST 2012


R. David Murray <rdmurray at bitdance.com> added the comment:

os.environ is not a dictionary, so it isn't all that surprising that a shallow copy doesn't behave like a shallow copy of a dictionary.  deepcopy does what you'd expect, as does os.environ.copy().

Perhaps it is worth improving this by adding a __copy__ method to os.environ.  Someone would need to propose a patch, and it would be an enhancement.

----------
nosy: +r.david.murray
type: behavior -> enhancement
versions: +Python 3.4 -Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15373>
_______________________________________


More information about the Python-bugs-list mailing list