[issue34465] ipaddress should accept bytearray in addition to bytes

Jörn Heissler report at bugs.python.org
Tue Sep 11 12:35:00 EDT 2018


Jörn Heissler <launchpad at joern.heissler.de> added the comment:

> Maybe add a special purposed named constructor IPv4Address.from_bytes() that will accept any objects supporting the buffer protocol?

That would work for me.
I wonder if there should be something like ipaddress.ip_address_from_bytes too that can construct IPv4Adress or IPv6Address.

----------

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


More information about the Python-bugs-list mailing list