This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients blueyed, ned.deily, vstinner
Date 2014-02-19.13:38:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1392817121.89.0.754641209683.issue20658@psf.upfronthosting.co.za>
In-reply-to
Content
> It comes from the real environment.

Oh. It looks possible to define an environment variable with an empty key, but not to remove it:

$ env -i =value python -c 'import pprint, os; pprint.pprint(os.environ); del os.environ[""]'
environ({'': 'value'})
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "Lib/os.py", line 662, in __delitem__
    self.unsetenv(encodedkey)
OSError: [Errno 22] Invalid argument
History
Date User Action Args
2014-02-19 13:38:41vstinnersetrecipients: + vstinner, blueyed, ned.deily
2014-02-19 13:38:41vstinnersetmessageid: <1392817121.89.0.754641209683.issue20658@psf.upfronthosting.co.za>
2014-02-19 13:38:41vstinnerlinkissue20658 messages
2014-02-19 13:38:41vstinnercreate