On Tue, Sep 29, 2009 at 9:03 AM, Antoine Pitrou <solip...@pitrou.net> wrote: > >> I've mentioned at least once (and others have mentioned as well) that >> it's very common, when describing the ip address/prefix of a NIC to >> write, "192.168.1.100/24" > > You say it yourself : it describes "the ip address/prefix of a NIC". > It isn't the job of a Network class. A Network shouldn't describe a > host, or a particular NIC.
Hey Antoine, Can we drop the pedantic discussion about what "should" or "shouldn't" be the job of a "Network" class, and just proceed to a pragmatic compromise? Peter has already posted that he is okay with __eq__ and friends ignoring the .ip attribute, which sounds good enough to me. His use case (which he mentioned to me off-list) is simply that if the denormalized .ip attribute weren't saved as part of the IPNetwork class, in many cases he'd have to keep track of it separately, which just feels clumsy. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com