A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/071280.html below:

[Python-Dev] Py2.6 ideas

[Python-Dev] Py2.6 ideas [Python-Dev] Py2.6 ideasRaymond 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4