[issue868845] Need unit tests for <...> reprs

2011-10-19 Thread Éric Araujo
Éric Araujo added the comment: I opened #13224 with a patch to change str(class). -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue868845] Need unit tests for <...> reprs

2011-10-18 Thread Éric Araujo
Éric Araujo added the comment: > I sometimes wish that the str() of a class would return the class name > rather than its repr(); that way "print(str)" would print "str" > instead of . (Use case: printing an exception and its > message: I wish I could print("%s: %s" % (err.__class__, err)) inst

[issue868845] Need unit tests for <...> reprs

2011-10-18 Thread Guido van Rossum
Guido van Rossum added the comment: I think there's nothing to be done for a bug this general. If you find a specific object whose repr() is awkward, go ahead and file a specific bug. In most cases I think people who parse repr() output know they are on thin ice, and would prefer that the ob

[issue868845] Need unit tests for <...> reprs

2011-10-18 Thread Éric Araujo
Éric Araujo added the comment: Original report: > Samuele Pedroni points out in python-dev that the <...> style reprs of Python > objects are > not documented, standardized or even consistent (e.g. compare old-style and > new-style > classes). > > Yet there is plenty of code out there that for

[issue868845] Need unit tests for <...> reprs

2011-10-18 Thread Petri Lehtinen
Petri Lehtinen added the comment: Ping? I wonder whether closing an issue from 2004 would result in "Achievement unlocked: archaeological issue management" -- keywords: +patch nosy: +petri.lehtinen ___ Python tracker

[issue868845] Need unit tests for <...> reprs

2010-08-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Georg, did your two patches finish this issue, so it can be closed, or is there more to do? -- nosy: +terry.reedy versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker

[issue868845] Need unit tests for <...> reprs

2009-02-14 Thread Daniel Diniz
Changes by Daniel Diniz : -- components: +Tests -Library (Lib) keywords: +easy -patch stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 ___ Python tracker _

[issue868845] Need unit tests for <...> reprs

2008-03-25 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Applied doc patch in r61871, r61872 (3.0). -- nosy: +georg.brandl Tracker <[EMAIL PROTECTED]> __

[issue868845] Need unit tests for <...> reprs

2008-03-17 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: I think the attached patch captures the most of what can currently be said about <...> reprs. I think the biggest offender in terms of inconsistency in the 2.x series is the file object with the repr which does not even start with th

[issue868845] Need unit tests for <...> reprs

2008-03-17 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: I'd rather not label this as easy yet, since there's a decision to be made. I would welcome a doc patch though! Tracker <[EMAIL PROTECTED]> _

[issue868845] Need unit tests for <...> reprs

2008-03-17 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: If any work needs to be done on this issue, it should probably be labeled "easy." (At least the writing the unit tests part. Making <...> reprs consistent is another story.) The unit tests for old-style and new-style class reprs are