Skip to main content
Help us improve Python packaging – donate today!

polist, partially ordered list

Project Description

polist, partially ordered list
=========

.. sourcecode:: python

>>> from polist import PartialOrderedList
>>> p = PartialOrderedList()
>>> p.append(0, 'A')
>>> p.append(1, 'B')
>>> p.append(2, 'A')
>>> p
[0, 1, 2]
>>> assert [0, 1, 2] == p
>>> assert [2, 1, 0] == p
>>> assert [0, 2, 1] != p
>>> assert [1, 0, 2] != p
>>> assert [1, 2, 0] != p
>>> assert [2, 0, 1] != p

>>> p = PartialOrderedList()
>>> p.append(0, 'A')
>>> p.append(1, 'A')
>>> p.append(2, 'B')
>>> p.append(3, 'B')
>>> p.append(4, 'C')
>>> p.append(5, 'C')
>>> p
[0, 1, 2, 3, 4, 5]
>>> assert [0, 1, 2, 3, 4, 5] == p
>>> assert [0, 1, 3, 2, 4, 5] == p
>>> assert [1, 0, 2, 3, 4, 5] == p
>>> assert [1, 0, 3, 2, 4, 5] == p
>>> assert [0, 1, 2, 3, 5, 4] == p
>>> assert [0, 1, 3, 2, 5, 4] == p
>>> assert [1, 0, 2, 3, 5, 4] == p
>>> assert [1, 0, 3, 2, 5, 4] == p

Release history Release notifications

This version
History Node

0.0.2

History Node

0.0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
polist-0.0.2.macosx-10.9-intel.tar.gz (3.1 kB) Copy SHA256 hash SHA256 Dumb Binary any May 9, 2014
polist-0.0.2-py2.7.egg (4.3 kB) Copy SHA256 hash SHA256 Egg 2.7 May 9, 2014
polist-0.0.2.tar.gz (2.7 kB) Copy SHA256 hash SHA256 Source None May 9, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page