[Python-3000] Types and classes

Terry Reedy tjreedy at udel.edu
Mon Apr 7 20:11:29 CEST 2008


"Guido van Rossum" <guido at python.org> wrote in message 
news:ca471dc20804071027h3f138cd7m345ed196c32ab0c7 at mail.gmail.com...
|>  Could not find this in tracker, so http://bugs.python.org/issue2565
|
| And thanks to Martin for making it so.
|
| As a follow-up, what do people think of making the str() of a class
| return just the thing between '...' in the repr()? This is much
| shorter and in many cases enough.

As in
>>> print(type(3))
int                                         # instead of <class 'int'>

? Looks good to me.

| (This actually inverses the rule that the repr() ought to resemble an
| expression and the str() could be anything convenient, but I'd rather
| see the repr() be unambiguous.)
\ 





More information about the Python-3000 mailing list