diff options
author | Georg Brandl <georg@python.org> | 2007-09-20 17:57:59 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-09-20 17:57:59 (GMT) |
commit | 4a21268a749ee7461a4b744ddaa1fbcb0f22e7d5 (patch) | |
tree | 89bac425452d22734895bd553eaa298ddb5470e9 /Doc/library | |
parent | e2176020f99e2ac6598f95a537025aae46aced07 (diff) | |
download | cpython-4a21268a749ee7461a4b744ddaa1fbcb0f22e7d5.zip cpython-4a21268a749ee7461a4b744ddaa1fbcb0f22e7d5.tar.gz cpython-4a21268a749ee7461a4b744ddaa1fbcb0f22e7d5.tar.bz2 |
Patch #1181: add os.environ.clear() method.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/os.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 7f03a75..24830d2 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -115,9 +115,13 @@ process and user. passed to the appropriate process-creation functions to cause child processes to use a modified environment. - If the platform supports the :func:`unsetenv` function, you can delete items in + If the platform supports the :func:`unsetenv` function, you can delete items in this mapping to unset environment variables. :func:`unsetenv` will be called - automatically when an item is deleted from ``os.environ``. + automatically when an item is deleted from ``os.environ``, and when + :meth:`os.environ.clear` is called. + + .. versionchanged:: 2.6 + Also unset environment variables when calling :meth:`os.environ.clear`. .. function:: chdir(path) |