Message308199
For your current situation, list(os.environ) or iter(os.environ) both return keys only.
It looks like the __repr__ on the class for os.environ is printed for os.environ (which is expected). For os.environ.keys(), the same __repr__ is wrapped as a KeysView, for os.environ.values(), it's wrapped as a ValuesView, and os.environ.items(), as an ItemsView.
In 2.7, os.environ.keys() print just keys. |
|
Date |
User |
Action |
Args |
2017-12-13 13:30:55 | cheryl.sabella | set | recipients:
+ cheryl.sabella, Aaron.Meurer |
2017-12-13 13:30:55 | cheryl.sabella | set | messageid: <1513171855.78.0.213398074469.issue32300@psf.upfronthosting.co.za> |
2017-12-13 13:30:55 | cheryl.sabella | link | issue32300 messages |
2017-12-13 13:30:55 | cheryl.sabella | create | |
|