> On Apr 29, 2020, at 12:02 PM, Christopher Barker <python...@gmail.com> wrote: > > On Apr 29, 2020, at 08:33, Christopher Barker <python...@gmail.com> wrote: > > I've wondered about Linked Lists for a while, but while there are many > > versions on PyPi, I can't find one that seems to be mature and maintained. > > Which seems to indicate that there isn't much demand for them. > > Isn't much demand for a *generic* linked list. It would probably be a good > recipe though -- so users could have a starting point for their custom > version.
In case you're interested, the pure python OrderedDict code uses a doubly linked list augmented by a dictionary to quickly find individual links. It may be worth taking at look.¹ The implementation was mostly obvious. The only trick was to use weakrefs for the backlink to avoid creating a reference cycle — the original version just lets GC do the clean-up, but users wanted to avoid cycles entirely. Raymond ¹ https://github.com/python/cpython/blob/3.8/Lib/collections/__init__.py#L78 _______________________________________________ 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/5ZSDX4FBSZEG3W6CGY6DNDOTLDOK7AQJ/ Code of Conduct: http://python.org/psf/codeofconduct/