Wyko ter Haar added the comment:
You bet. Totally forgot when I was replying on my phone :)
--
___
Python tracker
<https://bugs.python.org/issue42478>
___
___
New submission from Wyko ter Haar :
When increasing IPv4Interface('10.0.0.0/29)' by 1, I would expect to get
IPv4Interface('10.0.0.1/29') . Unfortunately, it seems to change the netmask on
it as well. That seems really unintuitive to me.
For example:
>>&
New submission from Wyko ter Haar :
It would be really nice if we could get an iterator just like
ip_network.hosts() that iterates over the interfaces in a subnet.
--
messages: 381921
nosy: wyko.ter.haar
priority: normal
severity: normal
status: open
title
Wyko ter Haar added the comment:
Literally just the same thing as .hosts(), except outputting interface
objects instead of addresses. Maybe it could be a flag in .hosts() instead,
something like "cast_as_interface".
Sincerely,
Wyko ter Haar
On Fri, Nov 27, 2020, 3:18 AM Eric V. Sm
Wyko ter Haar added the comment:
>>> X = ip_network("10.0.0.0/24")
>>> H= X.hosts(as_interfaces= True)
>>> next(H)
IPv4Interface('10.0.0.0/24')
>>> next(H)
IPv4Interface('10.0.0.1/24')
Something like that. Sure, I could cast
Wyko ter Haar added the comment:
Starting at .1, not .0.
Sincerely,
Wyko ter Haar
On Fri, Nov 27, 2020, 10:14 AM Wyko ter Haar
wrote:
> >>> X = ip_network("10.0.0.0/24")
> >>> H= X.hosts(as_interfaces= True)
> >>> next(H)
> IPv4Inter