binascii.a2b_binary
Scott David Daniels
scott.daniels at acm.org
Mon Apr 3 12:20:46 EDT 2006
Ed Swarthout wrote:
> Why is there no binascii.a2b_binary(bitstr) which returns the binary data
> represented by the bit string? Like:
>
>>>> binascii.a2b_binary('0011001100110101')
> '35'
> perl has pack("B*", "0011001100110101");
What, you mean like:
int('0011001100110101', 2)
Which you could show as:
hex(int('0011001100110101', 2))
I guess because Python is not so wonderful as Perl. Apparently Python
stupidly forgot to follow Perl's great naming conventions.
--Scott David Daniels
scott.daniels at acm.org
More information about the Python-list
mailing list