i meant that
@DeaD_EyE your 3rd code box shows that the core implementation of len() or __len__() is trying to do something wrong with the value being returned. IMHO, since Python version 3 has theoretically made the implementation of int obscure (e.g. we are to see no effect if the value fits in the native word size or not) they should do that everywhere, but have failed to do that, here. IMHO, this needs to be fixed in 3.8. what the implementation should do is pass the object it get, along, only checking to be sure it is type int. this kind of brokenness is something i would expect in version 2.
len(network)
is the number of addresses in the network the object describes, not the size of address. there is already an attribute ("max_prefixlen") for that.@DeaD_EyE your 3rd code box shows that the core implementation of len() or __len__() is trying to do something wrong with the value being returned. IMHO, since Python version 3 has theoretically made the implementation of int obscure (e.g. we are to see no effect if the value fits in the native word size or not) they should do that everywhere, but have failed to do that, here. IMHO, this needs to be fixed in 3.8. what the implementation should do is pass the object it get, along, only checking to be sure it is type int. this kind of brokenness is something i would expect in version 2.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.