[Python-Dev] Fwd: PEP 3144 review.

Steven D'Aprano steve at pearwood.info
Thu Sep 17 19:27:33 CEST 2009


On Fri, 18 Sep 2009 12:44:04 am DrKJam wrote:

> IPv6 doesn't support the notion of a broadcast address as part of a
> CIDR network block at all. AFAIK, it is a perfect legitimate for the
> last address in an IPv6 block to be used to configure a network
> interface. The IPv6 network object interface should possibly leave
> out the broadcast property/method altogether although there are
> reasons to keep it in for the sake of completeness and API
> consistency. The pros and cons of this need to be considered.

This seems to me to be rather weird: that for the sake of completeness 
and consistency you're considering to give an object which (allegedly) 
has no notion of "broadcast address" a broadcast address method.

If so, I can see three options. Given an appropriate IPv6 object:

obj.broadcast() always returns None.

obj.broadcast() always raises an exception.

obj.broadcast() always returns something which is not a broadcast 
address.

I would hope the third option isn't being seriously considered! Are 
there any reasons to consider the first two?



-- 
Steven D'Aprano


More information about the Python-Dev mailing list