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 jongfoster
Recipients jongfoster
Date 2013-08-21.21:00:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377118857.87.0.169407991036.issue18802@psf.upfronthosting.co.za>
In-reply-to
Content
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 IPv[46]Network.netmask property is not documented

* The IPv[46]Network.hostmask property is wrongly called "host mask"
  (with a space!) in the docs

* The IPv[46]Network.hostmask property is wrongly documented as a
  string but it's actually an IPv[46]Address

* 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
  not obvious.

* 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.

Kind regards,

Jon
History
Date User Action Args
2013-08-21 21:00:58jongfostersetrecipients: + jongfoster
2013-08-21 21:00:57jongfostersetmessageid: <1377118857.87.0.169407991036.issue18802@psf.upfronthosting.co.za>
2013-08-21 21:00:57jongfosterlinkissue18802 messages
2013-08-21 21:00:57jongfostercreate