This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wyko.ter.haar
Recipients eric.smith, wyko.ter.haar
Date 2020-11-27.09:16:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CACtrmfVdwoC4JYfR+x+yD+GBLd45iQzuGNsWc2ZCWY1mUy7BPw@mail.gmail.com>
In-reply-to <CACtrmfW5ABRwnuBk3nGFpnfvpM7iAWEArNDO=PN5hn-TDEYNqQ@mail.gmail.com>
Content
Starting at .1, not .0.

Sincerely,

Wyko ter Haar

On Fri, Nov 27, 2020, 10:14 AM Wyko ter Haar <wyko.ter.haar@gmail.com>
wrote:

> >>> 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 the output of hosts as an
> interface, but then it would be missing the netmask.
>
> Sincerely,
>
> Wyko ter Haar
>
> On Fri, Nov 27, 2020, 10:04 AM Wyko ter Haar <report@bugs.python.org>
> wrote:
>
>>
>> Wyko ter Haar <wyko.ter.haar@gmail.com> 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. Smith <report@bugs.python.org>
>> wrote:
>>
>> >
>> > Eric V. Smith <eric@trueblade.com> added the comment:
>> >
>> > I'm not sure what you mean by iterating over the interfaces in a subnet.
>> > Could you give an example?
>> >
>> > ----------
>> > nosy: +eric.smith
>> >
>> > _______________________________________
>> > Python tracker <report@bugs.python.org>
>> > <https://bugs.python.org/issue42478>
>> > _______________________________________
>> >
>>
>> ----------
>>
>> _______________________________________
>> Python tracker <report@bugs.python.org>
>> <https://bugs.python.org/issue42478>
>> _______________________________________
>>
>
History
Date User Action Args
2020-11-27 09:16:07wyko.ter.haarsetrecipients: + wyko.ter.haar, eric.smith
2020-11-27 09:16:07wyko.ter.haarlinkissue42478 messages
2020-11-27 09:16:07wyko.ter.haarcreate