unicodeset is a small module for managing sets of unique unicode code points.
The classes UnicodeSet and FrozenUnicodeSet as superclasses of the respective Python builtins.
from unicodeset import UnicodeSet, FrozenUnicodeSet
Values can be passed in as either integers or strings (or unicode strings in Python 2.7).
>>> s = UnicodeSet(['a', 98, u'c'])
UnicodeSet([u'a', u'b', u'c'])
Inclusion can be checked using either an integer or string representations.
>>> s = UnicodeSet([u'a', u'b', u'c'])
>>> 98 in s
True
>>> 'b' in s
True
Iterating over UnicodeSet returns values sorted by code point.
>>> [c for c in UnicodeSet(['z', 'n', '$', 'a'])]
[u'$', u'a', u'n', u'z']
Supports Python 2.6 – 3.x
Release files for unicodeset 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| unicodeset-0.1.0.tar.gz | 1.7 kB | Details |
Release files / unicodeset-0.1.0.tar.gz
| Download URL | unicodeset-0.1.0.tar.gz |
|---|---|
| Size | 1.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c4d0f23589a21edee11a2149848ecbbc5e9dfd42a4c7244092bae0f126e62b8
|
|
BLAKE2b-256 checksum How to use checksums |
91a6f0be9eb44cf20141fb01b5028ce4dcc93431b5f1b1ca50c6065fed7b8c9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |