STINNER Victor added the comment: putenv("=value") does nothing: it doesn't create a variable with an empty name. You can test with the attach test_empty_env_var.py script (written for Linux).
Attached reject_empty_env_var.patch patch modifies posix.putenv() to raise a ValueError if the name is empty. The patch is incomplete, the Windows part should also be modified. But I didn't test yet if Windows supports variables with empty name. ---------- nosy: +haypo Added file: http://bugs.python.org/file34132/test_empty_env_var.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20658> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com