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

Alexey S python-3000 at udmvt.ru
Wed Sep 16 11:08:49 CEST 2009


On Wed, Aug 19, 2009 at 02:28:38PM -0400, Glyph Lefkowitz wrote:
> On Wed, Aug 19, 2009 at 2:20 PM, Eric Smith <eric at trueblade.com> wrote:
> 
> 
> > I think using .network and .broadcast are pretty well understood to be the
> > [0] and [-1] of the network address block. I don't think we want to start
> > creating new terms or access patterns here.
> >
> > +1 on leaving .network and .broadcast as-is (including returning a
> > IPvXAddress object).
> >
> 
> -1.  I think 'network.number' or 'network.zero' is a lot clearer than
> 'network.network'.  Maybe '.broadcast' would be okay, as long as it *can* be
> adjusted for those unusual, or maybe even only hypothetical, networks where
> it is not the [-1].
Real life example: network with a /31 mask.
There are only two hosts: 0 and 1
first host configures the other's host as broadcast address and vice versa.
NOTE - broadcasts are different here!
Everything works, no one ever need to address "network" address, broadcasting
works as expected. It works well between two our routers.
What is wrong here? It just works for two Linuxes. It emulates point-to-point.
Well, some weird soft will not let you to configure that (on Windows?heh)? So
just let Python be off the shame list.

Another real life examples include /32 networks on PPP. Just a point-to-point.
No need for broadcasts and networks, a host just have one IP address and
send all traffic via point-to-point link, no addressing is required there.
This is a working dialup configuration, it works for me, it works for you, probably.
It is not weird, it is common, it is used for PPPoE, for ADSL, for dialup.


-- 
Alexey S.


More information about the Python-Dev mailing list