Apr
3
SortedContainers
In Sorted Collections in the stdlib, I went over why I think we want sorted collections in the stdlib, what they should look like, and why we don't have them.
The biggest stumbling block is that we don't have a good implementation written by someone willing to contribute it (including making any changes that come out of the PEP process) and maintain it into the future. Of course with most non-copyleft open-source libraries, anyone could just fork the library and contribute and maintain that fork. But most of them aren't really close enough to do that. In particular, most of them either don't have a pure-Python implementation, or it's incomplete, or it's much slower than the C implementation; porting someone else's C code to pure Python and then optimizing can be a pretty big project.
The biggest stumbling block is that we don't have a good implementation written by someone willing to contribute it (including making any changes that come out of the PEP process) and maintain it into the future. Of course with most non-copyleft open-source libraries, anyone could just fork the library and contribute and maintain that fork. But most of them aren't really close enough to do that. In particular, most of them either don't have a pure-Python implementation, or it's incomplete, or it's much slower than the C implementation; porting someone else's C code to pure Python and then optimizing can be a pretty big project.