[New-bugs-announce] [issue18802] ipaddress documentation errors
report at bugs.python.org
Wed Aug 21 23:00:57 CEST 2013
New submission from Jon Foster:
I recently looked at using the ipaddress module in a project, and noticed some discrepencies between the code and the documentation, and some things that weren't documented. A patch to fix these is attached.
* The IPv4Network.__init__ documentation wrongly claims that "/0.0.0.0"
would be interpreted as a host mask i.e. "/32". It's actually
interpreted as a net mask, i.e. "/0".
* The IPvNetwork.netmask property is not documented
* The IPvNetwork.hostmask property is wrongly called "host mask"
(with a space!) in the docs
* The IPvNetwork.hostmask property is wrongly documented as a
string but it's actually an IPvAddress
* The IPv6Network.__init__ documentation wrongly claims that a netmask
can be specified, but this is not supported by the code. The code
only supports prefix lengths.
* The documentation should explain how network objects are ordered,
since it's not obvious.
* The documentation should explain how interface objects are compared,
both with other interface objects and with address objects, as it's
* It's probably a good idea to document that you can't always pass a
IPv4Interface object to a function that expects a IPv4Address.
* It would be nice to mention that address, network and interface objects
are all hashable.
components: Library (Lib)
title: ipaddress documentation errors
versions: Python 3.4
Added file: http://bugs.python.org/file31410/ipaddress_docs_v1.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce