2008/3/25, Alex Martelli <[EMAIL PROTECTED]>:
> > Since we have some strong use cases at least for the bytes->int case,
> > consistency then suggests that the other numeric types should all accept
> > bytes as well (interpreting them as ASCII encoded strings).
>
> +1 -- it seems very practical as well as consistent, and I see no downsides.
Mmm... Py3k-ish speaking....
"2.13" is an unicode string that holds four digits, two point one
three, which if converted to Decimal, gives me, well, Decimal("2.13").
b"2.13", as it's not a string of digits anymore, but a stream of 4
bytes, that represents the binary number 0x322e3133...
So, what I find difficult to know is how can you undoubtly express a
collection of digits (inherent to strings) through bytes (without
mixing pre-3k concepts).
Regards,
--
. Facundo
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com