Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Doubly linked list datastructure in Python

Project Description

This code is a Python implementation of a doubly linked list. I needed it for a very narrow scope, so the functionality might not have what you’re looking for. If you’d like a feature added, please email AWNystrom@gmail.com

INSTALLATION To instal, run the following command: python setup.py install

TESTING To run unit tests, run the following command: python doubly_linked_list/test_doubly_linked_list.py

USAGE Here’s some example usage:

>>> from doubly_linked_list import DoublyLinkedList
>>> dll = DoublyLinkedList(range(10))
>>> print dll
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> dll.moveToHead(dll.tail)
>>> print dll
[9, 0, 1, 2, 3, 4, 5, 6, 7, 8]
>>> dll.removeHead()
>>> print dll
[0, 1, 2, 3, 4, 5, 6, 7, 8]
>>> from random import shuffle
>>> shuffle(dll)
>>> print dll
[1, 4, 0, 2, 6, 3, 5, 7, 8]
>>> dll.moveToHead(dll.getNodeByIndex(4))
>>> print dll
[6, 1, 4, 0, 2, 3, 5, 7, 8]
Release History

Release History

This version
History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
doubly_linked_list-1.0.0.macosx-10.5-x86_64.exe (65.1 kB) Copy SHA256 Checksum SHA256 any Windows Installer Jul 9, 2014
doubly_linked_list-1.0.0.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Jul 9, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting