This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients htgoebel, r.david.murray
Date 2012-07-16.16:53:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342457616.3.0.297384280498.issue15373@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-07-16 16:53:36r.david.murraysetrecipients: + r.david.murray, htgoebel
2012-07-16 16:53:36r.david.murraysetmessageid: <1342457616.3.0.297384280498.issue15373@psf.upfronthosting.co.za>
2012-07-16 16:53:35r.david.murraylinkissue15373 messages
2012-07-16 16:53:35r.david.murraycreate