![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
An implementation of mutable and immutable ordered sets as thin wrappers around
Python's dict
class.
These classes are meant as drop-in replacements for Python's builtin set
and
frozenset
classes. Care has been taken to provide the same functionality as the Python classes,
without API additions or removals, to allow easy switching between set implementations. These classes are often
faster than other ordered set implementations
(but slower than Python's builtin sets).
In contrast to Python's builtin set
and frozenset
classes, the order of
items is kept (generally, insertion order), such that iterating over items in
the set as well as mutating operations are deterministic.
This package has no external dependencies.
Install this package with:
$ pip install orderedsets
Usage example:
from orderedsets import OrderedSet, FrozenOrderedSet
os = OrderedSet([1, 2, 4])
os.add(0)
assert list(os) == [1, 2, 4, 0]
os.remove(0)
fos = FrozenOrderedSet([1, 2, 4])
# a.add(0) # raises AttributeError: 'FrozenOrderedSet' object has no attribute 'add'
assert list(fos) == [1, 2, 4]
# sets with the same elements compare equal
assert os == fos == set([1, 2, 4]) == frozenset([1, 2, 4])
# only immutable sets can be hashed
assert hash(fos) == hash(frozenset([1, 2, 4]))
Please also see the documentation.
FAQs
An implementation of mutable and immutable ordered sets.
We found that orderedsets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.