[Python-Dev] For review: PEP 285: Adding a bool type
Samuele 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.