New submission from Kent Johnson <k...@kentsjohnson.com>: In Python 2.x, os.environ extends UserDict.IterableUserDict and therefore os.environ.__repr__() shows the environment. This makes it easy and intuitive to view the entire environment in the interactive interpreter.
In Python 3.1, os.environ extends _abcoll.MutableMapping and uses object.__repr__(). This is a much less useful representation. I suggest adding this __repr__() method to class os._Environ (os.py line 380): def __repr__(self): return repr(self.data) ---------- components: Library (Lib) messages: 95160 nosy: kjohnson severity: normal status: open title: Unhelpful __repr__() in os.environ type: behavior versions: Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7310> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com