[issue32820] Add bits method to ipaddress

Serhiy Storchaka report at bugs.python.org
Mon Feb 12 08:46:13 EST 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I wouldn't say that "0b00000000000000010000110110111000100001011010001100000000000000000000000000000000100010100010111000000011011100000111001100110100" is a very human readable. For more readability it is better to group digits by 4 or 8, and why not use hexadecimal then?

In any case the application of this feature looks pretty narrow to me. And since it can be implemented as a one-line function, I think it shouldn't be added in the stdlib. The ipaddress classes are already complex.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32820>
_______________________________________


More information about the Python-bugs-list mailing list