append to non-existing list

bonono at gmail.com bonono at gmail.com
Wed Nov 9 10:13:16 EST 2005


Fredrik Lundh wrote:
>     x = "10" + 20 # should this be 30 or 1020 or "1020" or ...?
>
I think Perl handles this case pretty well and sane.

In fact, this strict but dynamic type checking is quite painful to work
with, especially the new decimal class.

I can do a :

decimal + int

but not

decimal + float

But then when I use some built-in math functions, it can convert
decimal to float and return a float which then cannot be operate with
another decimal.




More information about the Python-list mailing list