[issue42478] ipaddress.IPv4network.interfaces()

2020-11-28 Thread Wyko ter Haar
Wyko ter Haar added the comment: You bet. Totally forgot when I was replying on my phone :) -- ___ Python tracker <https://bugs.python.org/issue42478> ___ ___

[issue42477] ip_interface addition and subtraction changes netmask

2020-11-26 Thread Wyko ter Haar
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: >>&

[issue42478] ipaddress.IPv4network.interfaces()

2020-11-26 Thread Wyko ter Haar
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

[issue42478] ipaddress.IPv4network.interfaces()

2020-11-27 Thread Wyko ter Haar
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

[issue42478] ipaddress.IPv4network.interfaces()

2020-11-27 Thread Wyko ter Haar
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

[issue42478] ipaddress.IPv4network.interfaces()

2020-11-27 Thread Wyko ter Haar
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