File: factory.rst

package info (click to toggle)
python-collections-extended 2.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 492 kB
  • sloc: python: 2,917; makefile: 59
file content (30 lines) | stat: -rw-r--r-- 1,301 bytes parent folder | download
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