Ravenports generated: 07 Apr 2023 22:25
[ravenports.git] / bucket_F1 / python-ordered-set
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-ordered-set
4 VERSION=                4.1.0
5 KEYWORDS=               python
6 VARIANTS=               py310 v11
7 SDESC[py310]=           Custom MutableSet that stays in order (3.10)
8 SDESC[v11]=             Custom MutableSet that stays in order (3.11)
9 HOMEPAGE=               none
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/33/55/af02708f230eb77084a299d7b08175cff006dea4f2721074b92cdb0296c0
14 DISTFILE[1]=            ordered_set-4.1.0-py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[py310]=           single
17 SPKGS[v11]=             single
18
19 OPTIONS_AVAILABLE=      PY310 PY311
20 OPTIONS_STANDARD=       none
21 VOPTS[py310]=           PY310=ON PY311=OFF
22 VOPTS[v11]=             PY310=OFF PY311=ON
23
24 DISTNAME=               ordered_set-4.1.0.dist-info
25
26 GENERATED=              yes
27
28 [PY310].USES_ON=                        python:py310,wheel
29
30 [PY311].USES_ON=                        python:v11,wheel
31
32 [FILE:2460:descriptions/desc.single]
33 [Pypi]
34
35 An OrderedSet is a mutable data structure that is a hybrid of a list and a
36 set.
37 It remembers the order of its entries, and every entry has an index number
38 that
39 can be looked up.
40
41 ## Installation
42
43 `ordered_set` is available on PyPI and packaged as a wheel. You can list it
44 as a dependency of your project, in whatever form that takes.
45
46 To install it into your current Python environment:
47
48     pip install ordered-set
49
50 To install the code for development, after checking out the repository:
51
52     pip install flit
53     flit install
54
55 ## Usage examples
56
57 An OrderedSet is created and used like a set:
58
59     >>> from ordered_set import OrderedSet
60
61     >>> letters = OrderedSet('abracadabra')
62
63     >>> letters
64     OrderedSet(['a', 'b', 'r', 'c', 'd'])
65
66     >>> 'r' in letters
67     True
68
69 It is efficient to find the index of an entry in an OrderedSet, or find an
70 entry by its index. To help with this use case, the `.add()` method returns
71 the index of the added item, whether it was already in the set or not.
72
73     >>> letters.index('r')
74     2
75
76     >>> letters[2]
77     'r'
78
79     >>> letters.add('r')
80     2
81
82     >>> letters.add('x')
83     5
84
85 OrderedSets implement the union (`|`), intersection (`&`), and difference
86 (`-`)
87 operators like sets do.
88
89     >>> letters |= OrderedSet('shazam')
90
91     >>> letters
92     OrderedSet(['a', 'b', 'r', 'c', 'd', 'x', 's', 'h', 'z', 'm'])
93
94     >>> letters & set('aeiou')
95     OrderedSet(['a'])
96
97     >>> letters -= 'abcd'
98
99     >>> letters
100     OrderedSet(['r', 'x', 's', 'h', 'z', 'm'])
101
102 The `__getitem__()` and `index()` methods have been extended to accept any
103 iterable except a string, returning a list, to perform NumPy-like "fancy
104 indexing".
105
106     >>> letters = OrderedSet('abracadabra')
107
108     >>> letters[[0, 2, 3]]
109     ['a', 'r', 'c']
110
111     >>> letters.index(['a', 'r', 'c'])
112     [0, 2, 3]
113
114 OrderedSet implements `__getstate__` and `__setstate__` so it can be
115 pickled,
116 and implements the abstract base classes `collections.MutableSet` and
117 `collections.Sequence`.
118
119 OrderedSet can be used as a generic collection type, similar to the
120 collections
121 in the `typing` module like List, Dict, and Set. For example, you can
122 annotate
123 a variable as having the type `OrderedSet[str]` or `OrderedSet[Tuple[int,
124 str]]`.
125
126 ## OrderedSet in data science applications
127
128 An OrderedSet can be used as a bi-directional mapping between a sparse
129 vocabulary and dense index numbers. As of version 3.1, it accepts NumPy
130 arrays
131 of index numbers as well as lists.
132
133
134
135 [FILE:113:distinfo]
136 046e1132c71fcf3330438a539928932caf51ddbc582496833e23de611de14562         7634 ordered_set-4.1.0-py3-none-any.whl
137