[Python-Dev] Decimal(unicode)

"Martin v. Löwis" martin at v.loewis.de
Wed Mar 26 07:11:58 CET 2008


> For binary representations, we already have the struct module to handle 
> the parsing, but for byte sequences with embedded ASCII digits it's 
> reasonably common practice to use strings along with the respective type 
> constructors.

Sure, but why can't you write

 foo = int(bar[start:stop].decode("ascii"))

then? Explicit is better than implicit.

Regards,
Martin


More information about the Python-Dev mailing list