On Sat, Oct 2, 2021, 10:20 PM Christopher Barker <python...@gmail.com> wrote:
> > But sure, if we can eliminate inefficiencies in Python standard data > types, then why not? > Because the C implementation becomes hard to maintain. All of our linear containers could benefit from non-linear implementations in some scenarios. But these usually have downsides (not trivial O(1) indexing) in others and greatly add to implementation complexity. For linear containers, ex: Abseil's absl::cord structure applied to any of those. https://github.com/abseil/abseil-cpp/blob/master/absl/strings/cord.h It'd be neat to have something like that. But having such a thing _replace_ the simple list, str, or bytes, or bytearray implementations itself presents practical challenges. > I’ve lost track of the exact use case here, but maybe the proposal a while > back for sequence views would help? > A memoryview-like for sequences? Yeah, that is what I'd start with as a concept. It'll wind up becoming a sequence-cord though. :P -gps
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/F5YOP7YXUNA7Y3BFO4R2PIVN5I7IIKCF/ Code of Conduct: http://python.org/psf/codeofconduct/