On Mon, Jul 28, 2008, Ondrej Certik wrote:
>
> as discussed before here:
>
> http://mail.python.org/pipermail/python-3000/2008-May/013876.html
Precisely because this has been discussed extensively with little to
show, I recommend that any further discussion be held on either
python-ideas or comp
Sebastian Haase wrote:
On Mon, Jul 28, 2008 at 10:59 AM, <[EMAIL PROTECTED]> wrote:
Ondrej> i.e. the str on list (and tuple and dict) calls repr() on the
Ondrej> elements, instead of str. This really seems to me like a bug.
Ondrej> Because if I wanted the repr() representation, I'd cal
Another disadvantage of calling str recursively rather than repr is that it
places an onus on anyone writing a class to write both a repr and a str
method (or be inconsistent with the newly-accepted standard for container
types).
I personally write a repr method for most classes, which aids debugg
On Mon, Jul 28, 2008 at 10:59 AM, <[EMAIL PROTECTED]> wrote:
>
>Ondrej> i.e. the str on list (and tuple and dict) calls repr() on the
>Ondrej> elements, instead of str. This really seems to me like a bug.
>Ondrej> Because if I wanted the repr() representation, I'd call repr()
>Ondr
On Mon, Jul 28, 2008 at 10:28:34AM +0200, Ondrej Certik wrote:
> http://mail.python.org/pipermail/python-3000/2008-May/013876.html
The PEP is pep-3140: http://python.org/peps/pep-3140.html and it has
been rejected. To revive it we need better, more compelling arguments. We
also need a plan for
Ondrej> i.e. the str on list (and tuple and dict) calls repr() on the
Ondrej> elements, instead of str. This really seems to me like a bug.
Ondrej> Because if I wanted the repr() representation, I'd call repr()
Ondrej> on the list/tuple/dict. If I want a nice readable
Ondrej> r
Hi,
as discussed before here:
http://mail.python.org/pipermail/python-3000/2008-May/013876.html
if you do:
>>> from decimal import Decimal
>>> a = Decimal(40)
>>> print a, a**2, a**3
40 1600 64000
>>> print [a, a**2, a**3]
[Decimal("40"), Decimal("1600"), Decimal("64000")]
>>> print {a: 3}
{Dec