Message281910
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. |
|
Date |
User |
Action |
Args |
2016-11-28 19:11:48 | steve.dower | set | recipients:
+ steve.dower, loewis, paul.moore, larry, tim.golden, r.david.murray, zach.ware, tzickel |
2016-11-28 19:11:48 | steve.dower | set | messageid: <1480360308.58.0.0237419734579.issue28824@psf.upfronthosting.co.za> |
2016-11-28 19:11:48 | steve.dower | link | issue28824 messages |
2016-11-28 19:11:48 | steve.dower | create | |
|