[Python-Dev] Py2.6 ideas
Raymond Hettinger
python at rcn.com
Tue Feb 20 09:57:56 CET 2007
>> * I remembered why the __repr__ function had a 'show' argument. I've
>> changed the name now to make it more clear and added a docstring.
>> The idea was the some use cases require that the repr exactly match
>> the default style for tuples and the optional argument allowed for that
>> possiblity with almost no performance hit.
>
> But what about simply changing the __repr__?
. . .
> In [4]: Point.__repr__ = tuple.__repr__
Okay, that is the better way.
Raymond
More information about the Python-Dev
mailing list