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 steve.dower
Recipients larry, loewis, paul.moore, r.david.murray, steve.dower, tim.golden, tzickel, zach.ware
Date 2016-11-28.19:11:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480360308.58.0.0237419734579.issue28824@psf.upfronthosting.co.za>
In-reply-to
Content
This works fine in Python 3, and also Python 2.7 *unless* you call .keys().

PS D:\> py -2.7
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> 'path' in os.environ, 'path' in os.environ.keys()
(True, False)

PS D:\> py
Python 3.6.0b4 (default, Nov 22 2016, 05:30:12) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> 'path' in os.environ, 'path' in os.environ.keys()
(True, True)

I suspect at this point, we aren't going to change this in Python 2.7 unless someone comes up with an incredibly motivating issue.
History
Date User Action Args
2016-11-28 19:11:48steve.dowersetrecipients: + steve.dower, loewis, paul.moore, larry, tim.golden, r.david.murray, zach.ware, tzickel
2016-11-28 19:11:48steve.dowersetmessageid: <1480360308.58.0.0237419734579.issue28824@psf.upfronthosting.co.za>
2016-11-28 19:11:48steve.dowerlinkissue28824 messages
2016-11-28 19:11:48steve.dowercreate