[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

STINNER Victor report at bugs.python.org
Mon Aug 30 10:24:00 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

By the way:
---
The env command from GNU coreutils supports setting the environment variable with an empty name but not unsetting it. That's a bug.

$ env '=wibble' env |grep wibble                                 
=wibble
$ env '=wibble' env -u '' env
env: cannot unset `': Invalid argument
---

https://unix.stackexchange.com/questions/178522/unsetting-environment-variable-with-an-empty-name

----------

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


More information about the Python-bugs-list mailing list