Message281910
| 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. |
|