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
=========
.. 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
polist-0.0.2.tar.gz
(2.7 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
polist-0.0.2-py2.7.egg
(4.3 kB
view details)
File details
Details for the file polist-0.0.2.tar.gz.
File metadata
- Download URL: polist-0.0.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e8bd4e2c7ab37010ebb9ffb3ea6b92f590c41f56458ea0ba48da5cb5fa8a6bd
|
|
| MD5 |
7d82791fe982c558a15cb412b940c241
|
|
| BLAKE2b-256 |
6a66be65b56fa6ab15e26f34dabda6960b3b7996d5aec4e2fc2760a3aa5b9aff
|
File details
Details for the file polist-0.0.2.macosx-10.9-intel.tar.gz.
File metadata
- Download URL: polist-0.0.2.macosx-10.9-intel.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af677ffecb461c7a656ebe262a9481c36225d3f5edcb5037960ce04b189c97b8
|
|
| MD5 |
f25003bcb59fd6d4767cb980f99a9855
|
|
| BLAKE2b-256 |
fe4694c622a8d104d2fb49b4cd04cfa58c871d7552834a5caeece20aa1d4bdf0
|
File details
Details for the file polist-0.0.2-py2.7.egg.
File metadata
- Download URL: polist-0.0.2-py2.7.egg
- Upload date:
- Size: 4.3 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51f25549d9325e927a2ea71e4651597051789ee2bdc26c51132ab0e40f82bf63
|
|
| MD5 |
6623d74749cab18bb7e92654eb6baab5
|
|
| BLAKE2b-256 |
5f824b61edbcd50a1c76370b637000442574a3f0da723d5fd835dc76a6d65852
|