projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa5b333
)
#9283: Fix repr(os.environ), display unicode keys and values on POSIX systems
author
Victor Stinner
<victor.stinner@haypocalc.com>
Wed, 28 Jul 2010 21:23:23 +0000
(21:23 +0000)
committer
Victor Stinner
<victor.stinner@haypocalc.com>
Wed, 28 Jul 2010 21:23:23 +0000
(21:23 +0000)
Lib/os.py
patch
|
blob
|
history
diff --git
a/Lib/os.py
b/Lib/os.py
index e9d44cc614bb7cbc9a5a382d4f845310e556d111..2f78d8dfce4ca1f85155fb24332ac4f3d8f45197 100644
(file)
--- a/
Lib/os.py
+++ b/
Lib/os.py
@@
-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)