converting decimal to binary

Dan Bishop danb_83 at yahoo.com
Sat May 24 17:32:00 EDT 2003


bokr at oz.net (Bengt Richter) wrote in message news:<ban5ef$fq$0 at 216.39.172.122>...

> I liked the literal pattern suggested for hex by someone whose name I've
> forgotten
> (I'm obviously using a regex to express it here):
> 
>     [01][xX][0123456789abcdefABCDEF]+
> 
> where the [01] indicated the sign bit to extend leftwards (so e.g., -1 == 1xF)

But how will that work after int/long unification?




More information about the Python-list mailing list