This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients berker.peksag, brett.cannon, larry, pitrou, rhettinger, serhiy.storchaka
Date 2015-06-07.14:38:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The world of reprs already isn't particularly consistent.  If you make your reprs consistent with module X, it'll be *inconsistent* with module Y, and vice versa.  I say let's just worry about making it nice and readable for humans.

That said, I like the asyncio reprs.  Specifically, I like how the interesting things (class, interesting values) are at the front and rear, and the address is in the middle.  While it's occasionally helpful (or even crucial!) to show the address, I *almost* never need to look at it.  Arranging the data in this way makes it easy to skip over the address when reading.

However, I don't think the parentheses or square brackets are necessary.  It's not like this is a computer-readable syntax, and for human beings it's just visual clutter.  I suggest it's sufficient to have comma separated values with a space after each comma.  Also: I definitely don't like the colon after the class name.

So here's how *I* might reformat all your examples:

<threading.Semaphore at 0xb710ec8c 10>
<threading.BoundedSemaphore at 0xb6ff1d6c 7/10>
<threading.Event at 0xb710ec8c unset>
<threading.Event at 0xb710ec8c set>
<threading.Barrier at 0xb6ff1d6c 0/10>
<threading.Barrier at 0xb6ff1d6c 3/10>
<threading.Barrier at 0xb6ff1d6c 0/10, broken>

p.s. Thank you for posting these samples of other approaches!  It definitely shed some light into the discussion.
Date User Action Args
2015-06-07 14:38:08larrysetrecipients: + larry, brett.cannon, rhettinger, pitrou, berker.peksag, serhiy.storchaka
2015-06-07 14:38:08larrysetmessageid: <>
2015-06-07 14:38:08larrylinkissue24391 messages
2015-06-07 14:38:08larrycreate