[Python-Dev] Py2.6 ideas (original) (raw)

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