Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Documentation
(And also for ipaddress.IPv6Network.hosts())
Inhttps://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.hosts andhttps://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Network.hosts thehosts() method is documented as returning an iterator, when in reality it can return an iteratoror a list.
This extra return possibilty can be seen in
Line 1549 in781cc68
| self.hosts=lambda: [IPv4Address(addr)] |
Line 2340 in781cc68
| self.hosts=lambda: [IPv6Address(addr)] |
and was introduced in 2020 in8e9c47a, but was fixed only recently in typeshed:python/typeshed@c0fed91
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Todo