The len and length properties were added due to an old deficiency in the len() method in that it couldn't be larger than a C int type. For 32-bit Python this was often too small to give the length of a bitstring (the limit was just 512 MiB). I don't believe this has ever been the case for 64-bit Python - your bitstring would have to be > 2 million Terabytes.
Maybe people are still using 32-bit Python even for 3.7 and later? In which case perhaps just de-emphasis the non-standard methods and document them as a special case?
The
len
andlength
properties were added due to an old deficiency in thelen()
method in that it couldn't be larger than a Cint
type. For 32-bit Python this was often too small to give the length of a bitstring (the limit was just 512 MiB). I don't believe this has ever been the case for 64-bit Python - your bitstring would have to be > 2 million Terabytes.Maybe people are still using 32-bit Python even for 3.7 and later? In which case perhaps just de-emphasis the non-standard methods and document them as a special case?