This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ewosborne
Recipients ewosborne
Date 2018-02-11.17:26:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518369966.66.0.467229070634.issue32820@psf.upfronthosting.co.za>
In-reply-to
Content
redoing with a bits() property method to return a string, a la:

    def bits(self):
        fstr = '0' + str(IPV4LENGTH) + 'b'
        return '0b' + format(int(self), fstr)


Works thusly:

import ipaddress as ip
a = ip.IPv4Address('0.0.0.42')
a.bits == '0b00000000000000000000000000101010'
History
Date User Action Args
2018-02-11 17:26:06ewosbornesetrecipients: + ewosborne
2018-02-11 17:26:06ewosbornesetmessageid: <1518369966.66.0.467229070634.issue32820@psf.upfronthosting.co.za>
2018-02-11 17:26:06ewosbornelinkissue32820 messages
2018-02-11 17:26:06ewosbornecreate