Package: screwhashesset
A set that handles all kinds of objects (hashable or not) and preserves the order of the elementspip install screwhashessetTested against Windows 10 / Python 3.10 / AnacondaThe module implements a data structure called "ScrewHashesSet"
which is a custom set implementation in Python.
The ScrewHashesSet combines the functionality of a set and a deque
(double-ended queue) by using a deque to store the elements and a set
to efficiently perform membership checks.The ScrewHashesSet provides various methods to manipulate and interact with the set,
including adding elements, removing elements, checking for membership,
performing set operations (e.g., union, intersection, difference), and modifying the set in-place.This module can be useful for developers who need to work with sets and
require efficient operations for adding, removing,
and checking membership of elements, while also having the flexibility of
a deque for efficient element insertion and removal at both ends of the set.
The ScrewHashesSet can be particularly beneficial in scenarios
where the order of elements is important, such as maintaining a
sorted collection or implementing a queue-like data structure.Advantages of using ScrewHashesSet:Efficient Membership Checks:The underlying set data structure allows for fast membership checks,
providing constant-time complexity O(1) for determining whether an element is in the set.Flexible Element Manipulation:The ScrewHashesSet supports various methods for adding, removing, and modifying elements,
including insertion at specific indices and removing elements from both ends of the set.Compatibility with Mutable Elements:An advantage of using the ScrewHashesSet module is its compatibility with mutable elements.
Unlike the built-in set in Python, which only allows immutable objects as elements,
the ScrewHashesSet module can handle both mutable and immutable objects.This means that you can use the ScrewHashesSet to store and manipulate objects that can be modified
after being added to the set. This flexibility is particularly useful when dealing with
complex data structures or objects that need to be updated or modified while still being part of the set.By supporting mutable elements, the ScrewHashesSet module provides developers with the ability
to work with a wider range of data types and structures, allowing for more flexible and dynamic use cases.
This advantage enhances the practicality and versatility of the module, making
it suitable for scenarios where mutable objects need to be stored, manipulated,
and tracked within a set-like data structure.Preserves Element Order:The ScrewHashesSet utilizes a deque to maintain the order of elements,
ensuring that the elements are stored and retrieved in the same order they were added.Set Operations:The module includes methods for performing common set operations, such as union,
intersection, difference, and symmetric difference, allowing developers to combine and
manipulate sets efficiently.Modifiable In-Place:Many methods of ScrewHashesSet modify the set in-place, providing the advantage of not requiring
additional memory allocation when modifying the set's contents.Import itfromscrewhashessetimportScrewHashesSetasseExamples with unmutablesl1=[9,0,1,2,3,4,5,6,7,8,9,9,]l2=[12,3,4,5,6,7,9,10,11,12,13]l3=[5,3,4,5]l4=[19,20,21,22]s1=se(l1)print(f"{s1=}")print(f"{len(s1)=}")print(f"{9ins1=}")print(f"{19ins1=}")print(f"{9notins1=}")print(f"{19notins1=}")print(f"{s1.isdisjoint(se(l4))=}")print(f"{s1.isdisjoint(l4)=}")print(f"{s1.issubset(se(l3))=}")print(f"{s1<=se(l3)=}")print(f"{s1<se(l3)=}")print(f"{se(l3).issubset(s1)=}")print(f"{se(l3)<=s1=}")print(f"{se(l3)<s1=}")print(f"{s1.issuperset(se(l3))=}")print(f"{s1>=se(l3)=}")print(f"{s1>se(l3)=}")print(f"{se(l3).issuperset(s1)=}")print(f"{se(l3)>=s1=}")print(f"{se(l3)>s1=}")print(f"{s1.union(l1,l2,l3,l4)=}")print(f"{s1.union(se(l1),se(l2),se(l3),se(l4))=}")print(f"{s1|l2|l3|l4=}")print(f"{s1|tuple(l2)|se(l3)|se(l4)=}")print(f"{[x**2forxins1]=}")print(f"{s1.intersection(l1,l2,l3)=}")print(f"{s1.intersection(se(l1),se(l2),se(l3))=}")print(f"{s1&l2&l3=}")print(f"{s1&tuple(l2)&se(l3)=}")print(f"{s1.difference(l2,l3)=}")print(f"{s1.difference(se(l2),se(l3))=}")print(f"{s1-l2-l3=}")print(f"{s1-tuple(l2)-se(l3)=}")print(f"{s1.symmetric_difference(l2,l3)=}")print(f"{s1.symmetric_difference(se(l2),se(l3))=}")print(f"{s1^l2^l3=}")print(f"{s1^tuple(l2)^se(l3)=}")s6=s1.copy()print(f"{s6iss1=}")print(f"{s6==s1=}")s6.update(l4)print(f"s6.update(l4)={s6}")s6.update(se(l2))print(f"s6.update(se(l2))={s6}")s7=s1.copy()s7|=l4print(f"s7 |= l4={s7}")s7|=se(l2)print(f"s7 |= se(l2)={s7}")s10=se(l1)s11=se(l2)s12=se(l3)s13=se(l4)s10.intersection_update(s11,s12,s13)print(f"s10.intersection_update(s11,s12,s13)={s10}")s10=se(l1)s10&=s11&s12&s13print(f"s10 &= s11 & s12 & s13={s10}")s10=se(l1)s10.difference_update(s11,s12,s13)print(f"s10.difference_update(s11,s12,s13)={s10}")s10=se(l1)s10-=s11|s12|s13print(f"s10 -= s11 | s12 | s13={s10}")s10=se(l1)s10.symmetric_difference_update(s11,s12,s13)print(f"s10.symmetric_difference_update(s11,s12,s13)={s10}")s10=se(l1)s10^=s11print(f"s10 ^= s11={s10}")s10=se(l1)s10.add(110)print(f"s10.add(110)={s10}")s10.remove(110)print(f"s10.remove(110)={s10}")try:s10.remove(110000)print(f"s10.discard(110000)={s10}")exceptExceptionasfe:print(fe)s10.discard(8)print(f"s10.discard(8)={s10}")s10.discard(110000)print(f"s10.discard(110000)={s10}")print(f"{s10.pop()=}")s10.clear()print(f"{s10}")#########################################################################################s10=se(l1)s10.appendleft(500)print(f"s10.appendleft(500)={s10}")s10.extend([5000,14500])print(f"s10.extend([5000,14500])={s10}")s10.extendleft([35000,314500])print(f"s10.extendleft([35000,314500])={s10}")print(f"{s10.index(35000)=}")s10.insert(3,1114500)print(f"s10.insert(3,1114500)={s10}")print(f"{s10.popleft()=}")s10.rotate(1)print(f"s10.rotate(1)={s10}")s10.reverse()print(f"s10.reverse()={s10}")# Outputs1=ScrewHashesSet([9,0,1,2,3,4,5,6,7,8])len(s1)=109ins1=True19ins1=False9notins1=False19notins1=Trues1.isdisjoint(se(l4))=Trues1.isdisjoint(l4)=Trues1.issubset(se(l3))=Falses1<=se(l3)=Falses1<se(l3)=Falsese(l3).issubset(s1)=Truese(l3)<=s1=Truese(l3)<s1=Trues1.issuperset(se(l3))=Trues1>=se(l3)=Trues1>se(l3)=Truese(l3).issuperset(s1)=Falsese(l3)>=s1=Falsese(l3)>s1=Falses1.union(l1,l2,l3,l4)=ScrewHashesSet([9,0,1,2,3,4,5,6,7,8,12,10,11,13,19,20,21,22])s1.union(se(l1),se(l2),se(l3),se(l4))=ScrewHashesSet([9,0,1,2,3,4,5,6,7,8,12,10,11,13,19,20,21,22])s1|l2|l3|l4=ScrewHashesSet([9,0,1,2,3,4,5,6,7,8,12,10,11,13,19,20,21,22])s1|tuple(l2)|se(l3)|se(l4)=ScrewHashesSet([9,0,1,2,3,4,5,6,7,8,12,10,11,13,19,20,21,22])[x**2forxins1]=[81,0,1,4,9,16,25,36,49,64]s1.intersection(l1,l2,l3)=ScrewHashesSet([5,3,4])s1.intersection(se(l1),se(l2),se(l3))=ScrewHashesSet([5,3,4])s1&l2&l3=ScrewHashesSet([5,3,4])s1&tuple(l2)&se(l3)=ScrewHashesSet([5,3,4])s1.difference(l2,l3)=ScrewHashesSet([0,1,2,8])s1.difference(se(l2),se(l3))=ScrewHashesSet([0,1,2,8])s1-l2-l3=ScrewHashesSet([0,1,2,8])s1-tuple(l2)-se(l3)=ScrewHashesSet([0,1,2,8])s1.symmetric_difference(l2,l3)=ScrewHashesSet([0,1,2,8,12,10,11,13,5,3,4])s1.symmetric_difference(se(l2),se(l3))=ScrewHashesSet([0,1,2,8,12,10,11,13,5,3,4])s1^l2^l3=ScrewHashesSet([0,1,2,8,12,10,11,13,5,3,4])s1^tuple(l2)^se(l3)=ScrewHashesSet([0,1,2,8,12,10,11,13,5,3,4])s6iss1=Falses6==s1=Trues6.update(l4)={9,0,1,2,3,4,5,6,7,8,19,20,21,22}s6.update(se(l2))={9,0,1,2,3,4,5,6,7,8,19,20,21,22,12,10,11,13}s7|=l4={9,0,1,2,3,4,5,6,7,8,19,20,21,22}s7|=se(l2)={9,0,1,2,3,4,5,6,7,8,19,20,21,22,12,10,11,13}s10.intersection_update(s11,s12,s13)={}s10&=s11&s12&s13={}s10.difference_update(s11,s12,s13)={0,1,2,8}s10-=s11|s12|s13={0,1,2,8}s10.symmetric_difference_update(s11,s12,s13)={0,1,2,8,12,10,11,13,5,3,4,19,20,21,22}s10^=s11={0,1,2,8,12,10,11,13}s10.add(110)={9,0,1,2,3,4,5,6,7,8,110}s10.remove(110)={9,0,1,2,3,4,5,6,7,8}110000isnotindeques10.discard(8)={9,0,1,2,3,4,5,6,7}s10.discard(110000)={9,0,1,2,3,4,5,6,7}s10.pop()=7{}s10.appendleft(500)={500,9,0,1,2,3,4,5,6,7,8}s10.extend([5000,14500])={500,9,0,1,2,3,4,5,6,7,8,5000,14500}s10.extendleft([35000,314500])={314500,35000,500,9,0,1,2,3,4,5,6,7,8,5000,14500}s10.index(35000)=1s10.insert(3,1114500)={314500,35000,500,1114500,9,0,1,2,3,4,5,6,7,8,5000,14500}s10.popleft()=314500s10.rotate(1)={14500,35000,500,1114500,9,0,1,2,3,4,5,6,7,8,5000}s10.reverse()={5000,8,7,6,5,4,3,2,1,0,9,1114500,500,35000,14500}Examples with mutablesl1=[[0,1],[0,1],[0,1],[1,2],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],]l2=[[2,3],[3,4],[4,5],[5,6],[11,12],[11,12],[12,13],[14,15],[15,16]]l3=[[3,4],[4,5],[5,6]]l4=[[19,20],[21,22],[22,23],{24:25}]s1=se(l1)print(f"{s1=}")print(f"{len(s1)=}")print(f"{9ins1=}")print(f"{19ins1=}")print(f"{9notins1=}")print(f"{19notins1=}")print(f"{s1.isdisjoint(se(l4))=}")print(f"{s1.isdisjoint(l4)=}")print(f"{s1.issubset(se(l3))=}")print(f"{s1<=se(l3)=}")print(f"{s1<se(l3)=}")print(f"{se(l3).issubset(s1)=}")print(f"{se(l3)<=s1=}")print(f"{se(l3)<s1=}")print(f"{s1.issuperset(se(l3))=}")print(f"{s1>=se(l3)=}")print(f"{s1>se(l3)=}")print(f"{se(l3).issuperset(s1)=}")print(f"{se(l3)>=s1=}")print(f"{se(l3)>s1=}")print(f"{s1.union(l1,l2,l3,l4)=}")print(f"{s1.union(se(l1),se(l2),se(l3),se(l4))=}")print(f"{s1|l2|l3|l4=}")print(f"{s1|tuple(l2)|se(l3)|se(l4)=}")print(f"{s1.intersection(l1,l2,l3)=}")print(f"{s1.intersection(se(l1),se(l2),se(l3))=}")print(f"{s1&l2&l3=}")print(f"{s1&tuple(l2)&se(l3)=}")print(f"{s1.difference(l2,l3)=}")print(f"{s1.difference(se(l2),se(l3))=}")print(f"{s1-l2-l3=}")print(f"{s1-tuple(l2)-se(l3)=}")print(f"{s1.symmetric_difference(l2,l3)=}")print(f"{s1.symmetric_difference(se(l2),se(l3))=}")print(f"{s1^l2^l3=}")print(f"{s1^tuple(l2)^se(l3)=}")s6=s1.copy()print(f"{s6iss1=}")print(f"{s6==s1=}")s6.update(l4)print(f"s6.update(l4)={s6}")s6.update(se(l2))print(f"s6.update(se(l2))={s6}")s7=s1.copy()s7|=l4print(f"s7 |= l4={s7}")s7|=se(l2)print(f"s7 |= se(l2)={s7}")s10=se(l1)s11=se(l2)s12=se(l3)s13=se(l4)s10.intersection_update(s11,s12,s13)print(f"s10.intersection_update(s11,s12,s13)={s10}")s10=se(l1)s10&=s11&s12&s13print(f"s10 &= s11 & s12 & s13={s10}")s10=se(l1)s10.difference_update(s11,s12,s13)print(f"s10.difference_update(s11,s12,s13)={s10}")s10=se(l1)s10-=s11|s12|s13print(f"s10 -= s11 | s12 | s13={s10}")s10=se(l1)s10.symmetric_difference_update(s11,s12,s13)print(f"s10.symmetric_difference_update(s11,s12,s13)={s10}")s10=se(l1)s10^=s11print(f"s10 ^= s11={s10}")s10=se(l1)s10.add(110)print(f"s10.add(110)={s10}")s10.remove(110)print(f"s10.remove(110)={s10}")try:s10.remove(110000)print(f"s10.discard(110000)={s10}")exceptExceptionasfe:print(fe)s10.discard(8)print(f"s10.discard(8)={s10}")s10.discard(110000)print(f"s10.discard(110000)={s10}")print(f"{s10.pop()=}")s10.clear()print(f"{s10}")#########################################################################################s10=se(l1)s10.appendleft(500)print(f"s10.appendleft(500)={s10}")s10.extend([5000,14500])print(f"s10.extend([5000,14500])={s10}")s10.extendleft([35000,314500])print(f"s10.extendleft([35000,314500])={s10}")print(f"{s10.index(35000)=}")s10.insert(3,1114500)print(f"s10.insert(3,1114500)={s10}")print(f"{s10.popleft()=}")s10.rotate(1)print(f"s10.rotate(1)={s10}")s10.reverse()print(f"s10.reverse()={s10}")# Outputs1=ScrewHashesSet([[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9]])len(s1)=99ins1=False19ins1=False9notins1=True19notins1=Trues1.isdisjoint(se(l4))=Trues1.isdisjoint(l4)=Trues1.issubset(se(l3))=Falses1<=se(l3)=Falses1<se(l3)=Falsese(l3).issubset(s1)=Truese(l3)<=s1=Truese(l3)<s1=Trues1.issuperset(se(l3))=Trues1>=se(l3)=Trues1>se(l3)=Truese(l3).issuperset(s1)=Falsese(l3)>=s1=Falsese(l3)>s1=Falses1.union(l1,l2,l3,l4)=ScrewHashesSet([[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[19,20],[21,22],[22,23],{24:25}])s1.union(se(l1),se(l2),se(l3),se(l4))=ScrewHashesSet([[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[19,20],[21,22],[22,23],{24:25}])s1|l2|l3|l4=ScrewHashesSet([[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[19,20],[21,22],[22,23],{24:25}])s1|tuple(l2)|se(l3)|se(l4)=ScrewHashesSet([[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[19,20],[21,22],[22,23],{24:25}])s1.intersection(l1,l2,l3)=ScrewHashesSet([[3,4],[4,5],[5,6]])s1.intersection(se(l1),se(l2),se(l3))=ScrewHashesSet([[3,4],[4,5],[5,6]])s1&l2&l3=ScrewHashesSet([[3,4],[4,5],[5,6]])s1&tuple(l2)&se(l3)=ScrewHashesSet([[3,4],[4,5],[5,6]])s1.difference(l2,l3)=ScrewHashesSet([[0,1],[1,2],[6,7],[7,8],[8,9]])s1.difference(se(l2),se(l3))=ScrewHashesSet([[0,1],[1,2],[6,7],[7,8],[8,9]])s1-l2-l3=ScrewHashesSet([[0,1],[1,2],[6,7],[7,8],[8,9]])s1-tuple(l2)-se(l3)=ScrewHashesSet([[0,1],[1,2],[6,7],[7,8],[8,9]])s1.symmetric_difference(l2,l3)=ScrewHashesSet([[0,1],[1,2],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[3,4],[4,5],[5,6]])s1.symmetric_difference(se(l2),se(l3))=ScrewHashesSet([[0,1],[1,2],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[3,4],[4,5],[5,6]])s1^l2^l3=ScrewHashesSet([[0,1],[1,2],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[3,4],[4,5],[5,6]])s1^tuple(l2)^se(l3)=ScrewHashesSet([[0,1],[1,2],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[3,4],[4,5],[5,6]])s6iss1=Falses6==s1=Trues6.update(l4)={[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[19,20],[21,22],[22,23],{24:25}}s6.update(se(l2))={[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[19,20],[21,22],[22,23],{24:25},[11,12],[12,13],[14,15],[15,16]}s7|=l4={[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[19,20],[21,22],[22,23],{24:25}}s7|=se(l2)={[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[19,20],[21,22],[22,23],{24:25},[11,12],[12,13],[14,15],[15,16]}s10.intersection_update(s11,s12,s13)={}s10&=s11&s12&s13={}s10.difference_update(s11,s12,s13)={[0,1],[1,2],[6,7],[7,8],[8,9]}s10-=s11|s12|s13={[0,1],[1,2],[6,7],[7,8],[8,9]}s10.symmetric_difference_update(s11,s12,s13)={[0,1],[1,2],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16],[3,4],[4,5],[5,6],[19,20],[21,22],[22,23],{24:25}}s10^=s11={[0,1],[1,2],[6,7],[7,8],[8,9],[11,12],[12,13],[14,15],[15,16]}s10.add(110)={[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],110}s10.remove(110)={[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9]}110000isnotindeques10.discard(8)={[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9]}s10.discard(110000)={[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9]}s10.pop()=[8,9]{}s10.appendleft(500)={500,[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9]}s10.extend([5000,14500])={500,[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],5000,14500}s10.extendleft([35000,314500])={314500,35000,500,[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],5000,14500}s10.index(35000)=1s10.insert(3,1114500)={314500,35000,500,1114500,[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],5000,14500}s10.popleft()=314500s10.rotate(1)={14500,35000,500,1114500,[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],5000}s10.reverse()={5000,[8,9],[7,8],[6,7],[5,6],[4,5],[3,4],[2,3],[1,2],[0,1],1114500,500,35000,14500}|add(self,other,/)|AddanelementtotheScrewHashesSet.||Args:|other:Theelementtoadd.||append(self,other,/)|AppendanelementtotheScrewHashesSet.||Args:|other:Theelementtoappend.||appendleft(self,elem,/)|AppendanelementtothebeginningoftheScrewHashesSetifitisnotalreadypresent.||Args:|elem:Theelementtoappend.||clear(self)|RemoveallelementsfromtheScrewHashesSet.||copy(self)|CreateashallowcopyoftheScrewHashesSet.||Returns:|ScrewHashesSet:AshallowcopyoftheScrewHashesSet.||difference(self,*others)|ReturnanewScrewHashesSetwithelementsthatareinthecurrentsetbutnotinanyoftheothersets.||Args:|*others:Variablenumberofsetstocomputethedifferencewith.||Returns:|ScrewHashesSet:AnewScrewHashesSetcontainingtheelementsthatareinthecurrentsetbutnotinanyoftheothersets.||difference_update(self,*others)|UpdatethecurrentScrewHashesSetwithelementsthatareinthecurrentsetbutnotinanyoftheothersets.||Args:|*others:Variablenumberofsetstocomputethedifferencewith.||discard(self,elem,/)|Removeanelementfromthesetifitispresent.||Args:|elem:Theelementtoberemovedfromtheset.||extend(self,elem,/)|ExtendtheScrewHashesSetbyaddingelementsfromaniterable.||Args:|elem:AniterablecontainingelementstoaddtotheScrewHashesSet.||extendleft(self,elem,/)|ExtendtheScrewHashesSetbyaddingelementsfromaniterabletothebeginning,iftheyarenotalreadypresent.||Args:|elem:AniterablecontainingelementstoaddtotheScrewHashesSet.||index(self,x,start=None,stop=None,/)|ReturntheindexofthefirstoccurrenceofanelementintheScrewHashesSet.||Args:|x:Theelementtosearchfor.|start(optional):Thestartingindexforthesearch.Ifnotprovided,thesearchstartsfromindex0.|stop(optional):Thestoppingindexforthesearch.Ifnotprovided,thesearchstopsatthelastindex.||Returns:|int:TheindexofthefirstoccurrenceoftheelementintheScrewHashesSet.||Raises:|ValueError:IftheelementisnotfoundintheScrewHashesSet.||insert(self,i,x,/)|InsertanelementataspecifiedindexintheScrewHashesSet.||Args:|i:Theindexatwhichtoinserttheelement.|x:Theelementtoinsert.||intersection(self,*others)|ReturnanewScrewHashesSetwithelementsthatarecommontothecurrentsetandalltheothersets.||Args:|*others:Variablenumberofsetstocomputetheintersectionwith.||Returns:|ScrewHashesSet:AnewScrewHashesSetcontainingtheelementsthatarecommontothecurrentsetandalltheothersets.||intersection_update(self,*others)|UpdatethecurrentScrewHashesSetwithelementsthatarecommontothecurrentsetandalltheothersets.||Args:|*others:Variablenumberofsetstocomputetheintersectionwith.||isdisjoint(self,other,/)|Checkifthecurrentsethasnoelementsincommonwiththeotherset.||Args:|other:Thesettocomparewith.||Returns:|bool:Trueifthesetsaredisjoint(havenoelementsincommon),Falseotherwise.||issubset(self,other,/)|Checkifeveryelementinthecurrentsetisalsointheotherset.||Args:|other:Thesettocomparewith.||Returns:|bool:Trueifeveryelementinthecurrentsetisalsointheotherset,Falseotherwise.||issuperset(self,other,/)|Checkifeveryelementintheothersetisalsointhecurrentset.||Args:|other:Thesettocomparewith.||Returns:|bool:Trueifeveryelementintheothersetisalsointhecurrentset,Falseotherwise.||pop(self)|RemoveandreturntherightmostelementfromtheScrewHashesSet.||Returns:|object:Theremovedelement.||Raises:|KeyError:IftheScrewHashesSetisempty.||popleft(self)|RemoveandreturntheleftmostelementfromtheScrewHashesSet.||Returns:|TheleftmostelementfromtheScrewHashesSet.||Raises:|IndexError:IftheScrewHashesSetisempty.||remove(self,elem,/)|RemovethespecifiedelementfromtheScrewHashesSet.||Args:|elem:Theelementtoremove.||Raises:|KeyError:IftheelementisnotpresentintheScrewHashesSet.||reverse(self)|ReversetheorderofelementsintheScrewHashesSet.||rotate(self,n=1,/)|RotatetheelementsintheScrewHashesSetbyaspecifiednumberofsteps.||Args:|n(optional):Thenumberofstepstorotatetheelements.Positivevaluesrotatetotheright,|andnegativevaluesrotatetotheleft.Thedefaultis1.||symmetric_difference(self,*others)|ComputethesymmetricdifferencebetweentheScrewHashesSetandmultipleothersets.||Args:|*others:Variablelengthargumentlistofothersets.||Returns:|ScrewHashesSet:AnewScrewHashesSetcontainingelementsthatarepresentinexactlyoneofthesets.||symmetric_difference_update(self,*others)|UpdatetheScrewHashesSetwiththesymmetricdifferencebetweenitselfandmultipleothersets.||Args:|*others:Variablelengthargumentlistofothersets.||union(self,*others)|ComputetheunionoftheScrewHashesSetandmultipleothersets.||Args:|*others:Variablelengthargumentlistofothersets.||Returns:|ScrewHashesSet:AnewScrewHashesSetcontainingalluniqueelementsfromallsets.||update(self,*others)|UpdatetheScrewHashesSetbyaddingelementsfrommultipleothersets.||Args:|*others:Variablelengthargumentlistofothersets.