2008/3/25, Alex Martelli <aleaxit at gmail.com>: > > 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/
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