Message 338566 - Python tracker

Message338566

Author Eddgar Rojas
Recipients Eddgar Rojas
Date 2019-03-21.19:45:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553197512.13.0.766410741462.issue36392@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-03-21 19:45:12Eddgar Rojassetrecipients: + Eddgar Rojas
2019-03-21 19:45:12Eddgar Rojassetmessageid: <1553197512.13.0.766410741462.issue36392@roundup.psfhosted.org>
2019-03-21 19:45:12Eddgar Rojaslinkissue36392 messages
2019-03-21 19:45:11Eddgar Rojascreate