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/2000-April/003245.html below:

[Python-Dev] str() for interpreter output

[Python-Dev] str() for interpreter output [Python-Dev] str() for interpreter outputTim Peters tim_one@email.msn.com
Fri, 7 Apr 2000 21:49:03 -0400
[Guido]
> Thanks for reminding me of what my original motivation was for using
> repr().  I am also still annoyed at some extension writers who violate
> the rule, and design a repr() that is nice to look at but lies about
> the type. ...

Back when this was a hot topic on c.l.py (there are no new topics <0.1
wink>), it was very clear that many did this to class __repr__ on purpose,
precisely because they wanted to get back a readable string at the
interactive prompt (where a *correct* repr may yield a megabyte of info --
see my extended examples from that thread with Rationals, and lists of
Rationals, and dicts w/ Rationals etc).

In fact, at least one Python old-timer argued strongly that the right thing
to do was to swap the descriptions of str() and repr() in the docs!

str()-should-also-"pass-str()-down"-ly y'rs  - tim





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