1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
.. currentmodule:: collections_extended
Collection Factory
==================
`collections_extended` also provides a collection factory.
Combining Python's standard collections with bags and setlists
allows you to create a collection with any combination of
ordered, unique and mutable.
================================================= ======= ======= ======
Collection Mutable Ordered Unique
================================================= ======= ======= ======
:class:`list` ✔ ✔
:class:`tuple` ✔
:class:`set` ✔ ✔
:class:`frozenset` ✔
:class:`bag` ✔
:class:`frozen_bag`
:class:`setlist` ✔ ✔ ✔
:class:`frozensetlist` ✔ ✔
================================================= ======= ======= ======
API
---
.. autofunction:: collections_extended.collection
Collection abstract base class from :mod:`collections.abc` for Python >= 3.6
and backported to < 3.6
|