On 3/14/2015 4:52 PM, Eric V. Smith wrote: > On 3/14/2015 7:04 AM, francis wrote: >> Hi, >>> I, too, was thinking /24. I think that overflowing the host portion >>> should raise OverflowError. >>> >> Just curiosity, why not a modulo calculation on the subnet instead >> of raising the error? > > Personally, I can't imaging wanting that behavior. I can't say I've ever > needed additional at all with an IP address, but if I did, it would only
That should be "I can't say I've ever needed addition at all...". > be to stay within the host portion. To wrap around seems odd. If you had > a /24 address and added 1000, should that really be the same as adding > 232 (= 1000 % 256)? It seems more likely it's an error. > > I'm +0 on adding addition with an OverflowError for the host portion, > and -1 on addition with modulo arithmetic. -- Eric. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com