Irit Katriel <[email protected]> added the comment:
They keys are checked now, so I think this is resolved. (Tested on windows and
Mac).
>>> os.environ[''] = 'X'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/iritkatriel/src/cpython/Lib/os.py", line 684, in __setitem__
putenv(key, value)
^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument
>>> os.environ['a=b'] = 'c'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/iritkatriel/src/cpython/Lib/os.py", line 684, in __setitem__
putenv(key, value)
^^^^^^^^^^^^^^^^^^
ValueError: illegal environment variable name
----------
nosy: +iritkatriel
resolution: -> out of date
status: open -> pending
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue20658>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com