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 cheryl.sabella
Recipients Aaron.Meurer, cheryl.sabella
Date 2017-12-13.13:30:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513171855.78.0.213398074469.issue32300@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-12-13 13:30:55cheryl.sabellasetrecipients: + cheryl.sabella, Aaron.Meurer
2017-12-13 13:30:55cheryl.sabellasetmessageid: <1513171855.78.0.213398074469.issue32300@psf.upfronthosting.co.za>
2017-12-13 13:30:55cheryl.sabellalinkissue32300 messages
2017-12-13 13:30:55cheryl.sabellacreate