Irit Katriel <iritkatr...@gmail.com> 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 <rep...@bugs.python.org>
<https://bugs.python.org/issue20658>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to