===========
Ordered Set
===========
.. image:: https://badge.fury.io/py/orderedset.png
:target: http://badge.fury.io/py/orderedset
.. image:: https://travis-ci.org/simonpercivall/orderedset.png?branch=master
:target: https://travis-ci.org/simonpercivall/orderedset
.. image:: https://pypip.in/d/orderedset/badge.png
:target: https://crate.io/packages/orderedset?version=latest
An Ordered Set implementation in Cython. Based on `Raymond Hettinger's OrderedSet recipe`_.
Example:
.. code-block:: python
>>> from orderedset import OrderedSet
>>> oset = OrderedSet([1, 2, 3])
>>> oset
OrderedSet([1, 2, 3])
>>> oset | [5, 4, 3, 2, 1]
OrderedSet([1, 2, 3, 5, 4])
* Free software: BSD license
* Documentation: http://orderedset.rtfd.org.
Features
--------
* Works like a regular set, but remembers insertion order;
* Is approximately 5 times faster than the pure Python implementation overall
(and 5 times slower than `set`);
* Compatible with Python 2.7 through 3.8;
* Supports the full set interface;
* Supports some list methods, like `index` and `__getitem__`.
* Supports set methods against iterables.
.. _`Raymond Hettinger's OrderedSet recipe`: http://code.activestate.com/recipes/576694/
Changelog
=========
2.0.3 - 2020-02-26
~~~~~~~~~~~~~~~~~~
* bugfix: Generate new C file to fix compile issues
2.0.2 - 2020-02-25
~~~~~~~~~~~~~~~~~~
* bugfix: Fix deprecation warning for collections.abc in Python 3.8+
2.0.1 - 2018-03-20
~~~~~~~~~~~~~~~~~~
* bugfix: Fix `isdisjoint` to return True when the sets are disjoint
* build: Include 3.6 when testing
* dist: Include test files in sdist
* docs: Make the Readme a bit prettier
2.0 - 2016-02-02
~~~~~~~~~~~~~~~~
* breaking change: All comparisons, other than `eq`, against other ordered sets
are now performed unordered; i.e., they are treated as regular sets.
* `isorderedsubset` and `isorderedsuperset` have been added to perform ordered
comparisons against other sequences. Using these methods with unordered
collections wield yield arbitrary (and depending on Python implementation,
unstable) results.
1.2 - 2015-09-29
~~~~~~~~~~~~~~~~
* bugfix: Set operations only worked with iterables if the OrderedSet was on the
left-hand side. They now work both ways.
* bugfix: The order of an intersection was the right-hand side's order. It is now
fixed to be the left-hand side's order.
1.1.2 - 2014-10-02
~~~~~~~~~~~~~~~~~~
* Make comparisons work with sets and lists, and not crash when compared with None.
1.1.1 - 2014-08-24
~~~~~~~~~~~~~~~~~~
* Add pickle/copy support to OrderedSet
1.1 - 2014-06-04
~~~~~~~~~~~~~~~~
* Make OrderedSets handle slicing in __getitem__().
1.0.2 - 2014-05-14
~~~~~~~~~~~~~~~~~~
* Add proper attribution and licenses.
1.0.1 - 2014-05-13
~~~~~~~~~~~~~~~~~~
* Don't require Cython to build an sdist.
1.0 - 2014-05-11
~~~~~~~~~~~~~~~~
* First implementation.
Raw data
{
"_id": null,
"home_page": "https://github.com/simonpercivall/orderedset",
"name": "orderedset",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "orderedset",
"author": "Simon Percivall",
"author_email": "percivall@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1d/b0/d85c1893d227ed20f2e446e16006aeab7ca698e721f7c607b647894efc63/orderedset-2.0.3.tar.gz",
"platform": "",
"description": "===========\nOrdered Set\n===========\n\n.. image:: https://badge.fury.io/py/orderedset.png\n :target: http://badge.fury.io/py/orderedset\n\n.. image:: https://travis-ci.org/simonpercivall/orderedset.png?branch=master\n :target: https://travis-ci.org/simonpercivall/orderedset\n\n.. image:: https://pypip.in/d/orderedset/badge.png\n :target: https://crate.io/packages/orderedset?version=latest\n\n\nAn Ordered Set implementation in Cython. Based on `Raymond Hettinger's OrderedSet recipe`_.\n\nExample:\n\n.. code-block:: python\n\n >>> from orderedset import OrderedSet\n >>> oset = OrderedSet([1, 2, 3])\n >>> oset\n OrderedSet([1, 2, 3])\n >>> oset | [5, 4, 3, 2, 1]\n OrderedSet([1, 2, 3, 5, 4])\n\n* Free software: BSD license\n* Documentation: http://orderedset.rtfd.org.\n\nFeatures\n--------\n\n* Works like a regular set, but remembers insertion order;\n* Is approximately 5 times faster than the pure Python implementation overall\n (and 5 times slower than `set`);\n* Compatible with Python 2.7 through 3.8;\n* Supports the full set interface;\n* Supports some list methods, like `index` and `__getitem__`.\n* Supports set methods against iterables.\n\n.. _`Raymond Hettinger's OrderedSet recipe`: http://code.activestate.com/recipes/576694/\n\n\nChangelog\n=========\n\n2.0.3 - 2020-02-26\n~~~~~~~~~~~~~~~~~~\n\n* bugfix: Generate new C file to fix compile issues\n\n2.0.2 - 2020-02-25\n~~~~~~~~~~~~~~~~~~\n\n* bugfix: Fix deprecation warning for collections.abc in Python 3.8+\n\n2.0.1 - 2018-03-20\n~~~~~~~~~~~~~~~~~~\n\n* bugfix: Fix `isdisjoint` to return True when the sets are disjoint\n* build: Include 3.6 when testing\n* dist: Include test files in sdist\n* docs: Make the Readme a bit prettier\n\n2.0 - 2016-02-02\n~~~~~~~~~~~~~~~~\n\n* breaking change: All comparisons, other than `eq`, against other ordered sets\n are now performed unordered; i.e., they are treated as regular sets.\n* `isorderedsubset` and `isorderedsuperset` have been added to perform ordered\n comparisons against other sequences. Using these methods with unordered\n collections wield yield arbitrary (and depending on Python implementation,\n unstable) results.\n\n1.2 - 2015-09-29\n~~~~~~~~~~~~~~~~\n\n* bugfix: Set operations only worked with iterables if the OrderedSet was on the\n left-hand side. They now work both ways.\n* bugfix: The order of an intersection was the right-hand side's order. It is now\n fixed to be the left-hand side's order.\n\n1.1.2 - 2014-10-02\n~~~~~~~~~~~~~~~~~~\n\n* Make comparisons work with sets and lists, and not crash when compared with None.\n\n1.1.1 - 2014-08-24\n~~~~~~~~~~~~~~~~~~\n\n* Add pickle/copy support to OrderedSet\n\n1.1 - 2014-06-04\n~~~~~~~~~~~~~~~~\n\n* Make OrderedSets handle slicing in __getitem__().\n\n1.0.2 - 2014-05-14\n~~~~~~~~~~~~~~~~~~\n\n* Add proper attribution and licenses.\n\n1.0.1 - 2014-05-13\n~~~~~~~~~~~~~~~~~~\n\n* Don't require Cython to build an sdist.\n\n1.0 - 2014-05-11\n~~~~~~~~~~~~~~~~\n\n* First implementation.",
"bugtrack_url": null,
"license": "BSD",
"summary": "An Ordered Set implementation in Cython.",
"version": "2.0.3",
"split_keywords": [
"orderedset"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1db0d85c1893d227ed20f2e446e16006aeab7ca698e721f7c607b647894efc63",
"md5": "148f7d6d30acd9bdb3c94519678f5f41",
"sha256": "b2f5ccfb5a86e7b3b3ddf18b29779cc18b24653abf9d6da4bebecf33780a6e29"
},
"downloads": -1,
"filename": "orderedset-2.0.3.tar.gz",
"has_sig": false,
"md5_digest": "148f7d6d30acd9bdb3c94519678f5f41",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 101424,
"upload_time": "2020-02-26T17:55:37",
"upload_time_iso_8601": "2020-02-26T17:55:37.285556Z",
"url": "https://files.pythonhosted.org/packages/1d/b0/d85c1893d227ed20f2e446e16006aeab7ca698e721f7c607b647894efc63/orderedset-2.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-02-26 17:55:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "simonpercivall",
"github_project": "orderedset",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [],
"test_requirements": [
{
"name": "Cython",
"specs": [
[
">=",
"0.20.1"
]
]
},
{
"name": "coverage",
"specs": [
[
"==",
"3.7.1"
]
]
}
],
"tox": true,
"lcname": "orderedset"
}