> Martin v. Löwis <martin <at> v.loewis.de> writes: >>> Could you explain what benefit there is for allowing the user to create >>> network objects that don't represent networks? Is there a use-case >>> where these networks-that-aren't-networks are something other than a >>> typo? Under what circumstances would I want to specify a network as >>> 192.168.1.1/24 instead of 192.168.1.0/24? >>> > [...] >> So Python code has to make the computation, and it seems most natural >> that the IP library is the piece of code that is able to compute a >> network out of that input. > > The thing is, it doesn't create a network, it creates a hybrid "network plus > host" which retains knowledge about the original host (that is, 192.168.1.1 > rather than simply 192.168.1.0, if you enter "192.168.1.1/24"). > > That's what the OP meant with "networks-that-aren't-networks", and that's what > people are objecting to. That's not the question that was asked, though - the question asked was "Under what circumstances would I want to specify...". I hope most people agree that it is desirable to be able to specify a network not just by its network address. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4