[New-bugs-announce] [issue1181] Redefine clear() for os.environ to use unsetenv() if possible
Martin Horcicka
report at bugs.python.org
Wed Sep 19 23:38:22 CEST 2007
New submission from Martin Horcicka:
This patch makes os.environ.clear() to have the same effect as:
for name in os.environ.keys():
del os.environ[name]
I believe that most people expect the effects to be the same anyway.
The practical benefit is a simpler redefinition of the whole environment
if desired (e.g. in scripts run via sudo on unix systems).
----------
components: Library (Lib)
files: os.py.patch
messages: 56048
nosy: horcicka
severity: normal
status: open
title: Redefine clear() for os.environ to use unsetenv() if possible
type: behavior
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1181>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: os.py.patch
Type: text/x-patch
Size: 967 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20070919/955263b9/attachment.bin
More information about the New-bugs-announce
mailing list