Nick Coghlan added the comment:
Closing this as a duplicate of issue 7434 (which is about redesigning pprint to
make it easier to add support for new types)
--
nosy: +ncoghlan
resolution: accepted - duplicate
stage: patch review - committed/rejected
status: open - closed
superseder: -
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5131
___
___
Changes by Rodrigo Bernardo Pimentel r...@isnomore.net:
--
nosy: +rbp
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5131
___
___
Python-bugs-list
Nick Craig-Wood n...@craig-wood.com added the comment:
Terry J. Reedy (terry.reedy) wrote:
IMHO pprint should be able to make a decent job of all the built in types
Agreed, already true as far as I know, and irrelevant. This issue is not
about built-in types in the builtins module, as
Nick Craig-Wood n...@craig-wood.com added the comment:
Raymond Hettinger (rhettinger) wrote:
Ben, I don't think there is any value is opening more issues like
pprint-doesn't-handle-object-x (named tuples, defautdicts, deques,
generators, etc).
As it is currently designed, pprint doesn't
Terry J. Reedy tjre...@udel.edu added the comment:
IMHO pprint should be able to make a decent job of all the built in types
Agreed, already true as far as I know, and irrelevant. This issue is not about
built-in types in the builtins module, as documented Lib Ref chapter 5
*Built-in Types*.
Ben Bass benpaulb...@googlemail.com added the comment:
Same applies to collections.deque, which seems closely related (being another
collections class). Can this get addressed here or should I open another issue?
(just been pprinting defaultdict(deque) objects, which clearly fails :)
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Ben, I don't think there is any value is opening more issues like
pprint-doesn't-handle-object-x (named tuples, defautdicts, deques, generators,
etc).
As it is currently designed, pprint doesn't offer usable hooks and it is
Éric Araujo mer...@netwok.org added the comment:
Jack, can you update your patch to reflect Terry’s review?
Amaury, have you opened a feature request about your registration idea?
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
BTW, Tarek’s name is valid UTF-8 in py3k.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5131
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Patch looks good to me.
(Some day the pprint module should grow some way to register repr for user
types, so we can stop adding special cases; but defaultdict() is a builtin)
--
nosy: +amaury.forgeotdarc
resolution: - accepted
Terry J. Reedy tjre...@udel.edu added the comment:
I removed 'a set or' from the title since sets are no longer an issue.
Since .fromkeys is a class method, it should be called on a class rather than
an instance. I was initially fooled by the irrelevant addition of '(int)'. 100
is
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
nosy: +fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5131
___
___
13 matches
Mail list logo