[Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

Nick Coghlan ncoghlan at gmail.com
Thu Aug 27 15:51:30 CEST 2009

DrKJam wrote:
> Currently I'm ambivalent on whether an IP(vX)Network class constructor
> should accept a numerical (i.e. integer) value at all *unless* you
> explicit state somehow that you want the network aspect to be inferred
> in some specific way. It isn't a case of just choosing /32 or /128 and
> having this as the only option. IP (v4) classful rules are still
> pervasive in the real world. A general case IP library available to the
> whole Python community should certainly take this into account.

Don't forget that separating the "from_int" construction behaviour out
to a separate class method is an available option rather than type-based
behaviour switching in the main constructor.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list