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/2002-March/020829.html below:

[Python-Dev] For review: PEP 285: Adding a bool type

[Python-Dev] For review: PEP 285: Adding a bool type [Python-Dev] For review: PEP 285: Adding a bool typeSamuele Pedroni pedroni@inf.ethz.ch
Sat, 9 Mar 2002 19:14:10 +0100
> Personally, I think repr(True) should return 1
> and str(True) should return "True" (in line with
> str being the "friendly" and repr the "techy"
> representations).
>

Probably non-sense:

eval(repr(True)) is True

should be true.

>From repr doc:

For many types, this function makes an attempt to return a string that would
yield an object with the same value when passed to eval().

AFAIK repr goes beyond that in the sense that for a value for which repr(x) has
not the property,
then eval(repr(x)) fails miserably.
Such types have a <...> repr.

repr is not just about techy reprs <wink>.

regards.




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