On Thu, Sep 17, 2009 at 6:25 AM, Eric Smith <e...@trueblade.com> wrote:
> Nick Coghlan wrote:
>>
>> To be honest, given the indexing behaviour, I'm -1 on the idea of giving
>> the network address or broadcast address attribute names *at all*.
>> Consider:
>>
>>  network_address = my_net[0]
>>  broadcast_address = my_net[-1]
>
> My only concern with this is a possible performance issue with v6 networks.
> Would this be implemented such that [-1] doesn't need to iterate through the
> (possibly large) address space of a v6 network?
>
> I think it could (and would) be implemented efficiently, so I'm +1 on not
> giving these names, but adding this "recipe" to the documentation instead.

indexing is plenty efficient, but the problem is that these names for
these attributes are common to the point of causing confusion if
they're omitted.

Cheers,
/peter

> Eric.
>
> _______________________________________________
> 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/python-dev%40hda3.com
>
_______________________________________________
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

Reply via email to