scott-griffiths / bitstring

A Python module to help you manage your bits
https://bitstring.readthedocs.io/en/stable/index.html
MIT License
412 stars 68 forks source link

Remove len and length properties #227

Closed scott-griffiths closed 2 years ago

scott-griffiths commented 2 years ago

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?

scott-griffiths commented 2 years ago

Decided to de-emphasise the properties rather than remove or even deprecate them. No point breaking people's code without a very good reason.