[issue7310] Unhelpful __repr__() in os.environ

2010-02-22 Thread R. David Murray
R. David Murray added the comment: I like (2). If someone tries to use the repr to recreate the object, it will fail with a message that mentions _Environ. So no information is lost, I think, by using (2). -- nosy: +r.david.murray ___ Python trac

[issue7310] Unhelpful __repr__() in os.environ

2010-02-22 Thread Ezio Melotti
Ezio Melotti added the comment: Do you have any preference about the text that should appear in the repr? There have been some discussion on #python-dev about it, and the two main proposal were: 1) _Environ({...}) -> the right class name but kind of "ugly" and probably unnecessary (if no one c

[issue7310] Unhelpful __repr__() in os.environ

2009-12-18 Thread Ezio Melotti
Ezio Melotti added the comment: New patch, I added the _Environ() around the dict in the repr and improved the tests. -- Added file: http://bugs.python.org/file15592/issue7310.diff ___ Python tracker __

[issue7310] Unhelpful __repr__() in os.environ

2009-12-18 Thread Ezio Melotti
Changes by Ezio Melotti : Removed file: http://bugs.python.org/file15348/issue7310.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue7310] Unhelpful __repr__() in os.environ

2009-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: New patch that includes a unittest. I was also considering to replace the repr() with something that looks like _Environ({dict-here}). That will still contain all the information and also clarify that os.environ is not just a simple dict. (Even if it's probably n

[issue7310] Unhelpful __repr__() in os.environ

2009-11-16 Thread Ezio Melotti
Changes by Ezio Melotti : Removed file: http://bugs.python.org/file15327/issue7310.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue7310] Unhelpful __repr__() in os.environ

2009-11-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: A unit test would be appreciated. It should check that the output looks like a dict. -- nosy: +amaury.forgeotdarc ___ Python tracker ___ _

[issue7310] Unhelpful __repr__() in os.environ

2009-11-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +needs review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7310] Unhelpful __repr__() in os.environ

2009-11-13 Thread Ezio Melotti
Ezio Melotti added the comment: Here is a patch against py3k. -- assignee: -> ezio.melotti keywords: +easy, patch nosy: +ezio.melotti priority: -> normal stage: -> patch review versions: +Python 3.2 Added file: http://bugs.python.org/file15327/issue7310.diff

[issue7310] Unhelpful __repr__() in os.environ

2009-11-12 Thread Kent Johnson
New submission from Kent Johnson : 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.Muta