New submission from Eddgar Rojas <[email protected]>:
The python the Class IPv4Interface on the ipaddress module when I try to use
the .prefixlen attribute it says that do not exist but is i have access by
using ._prefixlen
if i have on the IPv4Interface class the .netmask attribute and the .nethost
attribute Why not the .prefixlen attribute?,
I reported like a bug as i think that attribute should appear on the
IPv4Interface Class
Below test I did
>>> import ipaddress as ip
>>> addr = ip.ip_interface('192.168.1.1/24')
>>> addr.prefixlen
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'IPv4Interface' object has no attribute 'prefixlen'
>>> addr.netmask
IPv4Address('255.255.255.0')
>>> addr._prefixlen
24
----------
components: Library (Lib)
messages: 338566
nosy: Eddgar Rojas
priority: normal
severity: normal
status: open
title: IPv4Interface Object has no attributte prefixlen
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36392>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com