Python Forum
len() of ipaddress.ip_network()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
len() of ipaddress.ip_network()
#1
a network has a size. IMHO, a network object should have that same size, obtained via len(). but this seems to be missing in my Python version 3.5.2 (in Ubuntu 16.04.6). can someone who has Python version 3.7.X check it and see if it works? here is how to try it:
import ipaddress
len(ipaddress.ip_network('1::/32'))==2**96
it should be True. interface objects should work, too, giving the same size.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
len() of ipaddress.ip_network() - by Skaperen - May-17-2019, 03:49 AM
RE: len() of ipaddress.ip_network() - by heiner55 - May-17-2019, 05:33 AM
RE: len() of ipaddress.ip_network() - by perfringo - May-17-2019, 06:21 AM
RE: len() of ipaddress.ip_network() - by Skaperen - May-17-2019, 07:13 PM
RE: len() of ipaddress.ip_network() - by perfringo - May-18-2019, 06:25 AM
RE: len() of ipaddress.ip_network() - by Skaperen - May-18-2019, 11:14 PM
RE: len() of ipaddress.ip_network() - by DeaD_EyE - May-18-2019, 09:58 AM
RE: len() of ipaddress.ip_network() - by Skaperen - May-19-2019, 12:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  module ipaddress Skaperen 2 2,372 Aug-14-2018, 05:59 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020