Andrew McNamara wrote: > I also suggest the AddressWithMask classes not have any network/container > behaviours for a similar reason. If the developer needs these, the > .network attribute is only a lookup away. Another way to approach this would be for the Address object to potentially have a 'network' attribute referencing a Network object. Then there are only two classes, but three use cases are covered: 1) a Network 2) a plain, network-agnostic Address with network == None 3) an Address with an attached Network An Address could be constructed in three ways: Address(ip_number) Address(ip_number, network = <Network instance>) Address(ip_number, mask = <mask>) # constructs and attaches a suitably-masked Network instance We could also have some_network[n] return an Address referring back to the network object it was obtained from. -- Greg
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