On Thu, 17 Sep 2009 at 15:44, DrKJam wrote:
Granted, there are decisions to be made about exactly what the properties/methods should be named to avoid ambiguity, but they are important enough to be given access to in their own right. Details in docstrings help too ;-) 'network' and 'broadcast' are very much the convention used pretty much everywhere (including libraries found in other languages such as Ruby and Perl).
Interesting. Out of curiosity I searched for 'perl ip address' and found Net::IP (http://search.cpan.org/dist/Net-IP/IP.pm). This package appears to use the same object class for both addresses and networks. It has neither a 'network' nor a 'broadcast' attribute; instead it has 'ip' (it isn't clear from the docs if that returns the network address or the IP that was passed in to the constructor) and 'last_ip'. --David _______________________________________________ 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