[Python-Dev] Pie-thon benchmark code ready (original) (raw)
Guido van Rossum guido at python.org
Thu Jan 1 11:25:34 EST 2004
- Previous message: [Python-Dev] Pie-thon benchmark code ready
- Next message: [Python-Dev] Pie-thon benchmark code ready
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I still think that depending on <...> reprs should be non-portable and discouraged, also CPython is already rather whimsical in its own evolution (Python 2.3):
>>> class X: pass ... >>> X <class _main_.X at 0x007E2C30> >>> class X(object): pass ... >>> X <class '_main_.X'> >>> I may change my opinion if someone writes a (unit) test pinning down what is exactly meant by that somewhat.
That's a good point. I'll add a SF entry to request these unit tests.
What you see as whimsical was actually done for compatibility reasons; the new-style classes look more like built-in classes, whose repr is <type 'int'> or perhaps <type 'module.C'>. (It says 'type' if it's pure C, 'class' if it was created by a Python class statement.)
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Pie-thon benchmark code ready
- Next message: [Python-Dev] Pie-thon benchmark code ready
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]