diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-07-28 21:23:23 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-07-28 21:23:23 (GMT) |
commit | d73c1a3009d4bf0212d0d59111c1191066e245e4 (patch) | |
tree | 92922c0f8b5e8574753740a12c2aeafca2df3e78 | |
parent | aa5b33311acc183db86a178a221d058027648da8 (diff) | |
download | cpython-d73c1a3009d4bf0212d0d59111c1191066e245e4.zip cpython-d73c1a3009d4bf0212d0d59111c1191066e245e4.tar.gz cpython-d73c1a3009d4bf0212d0d59111c1191066e245e4.tar.bz2 |
#9283: Fix repr(os.environ), display unicode keys and values on POSIX systems
-rw-r--r-- | Lib/os.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -446,7 +446,9 @@ class _Environ(MutableMapping): return len(self.data) def __repr__(self): - return 'environ({!r})'.format(self.data) + return 'environ({})'.format(', '.join( + ('{!r}: {!r}'.format(self.decodekey(key), self.decodevalue(value)) + for key, value in self.data.items()))) def copy(self): return dict(self) |