View source on GitHub |
Like weakref.WeakSet, but compares objects with "is".
Inherits From: ObjectIdentitySet
tf_agents.utils.object_identity.ObjectIdentityWeakSet(
*args
)
Methods
add
add(
key
)
Add an element.
clear
clear()
This is slow (creates N new iterators!) but effective.
difference
difference(
items
)
discard
discard(
key
)
Remove an element. Do not raise an exception if absent.
intersection
intersection(
items
)
isdisjoint
isdisjoint(
other
)
Return True if two sets have a null intersection.
pop
pop()
Return the popped value. Raise KeyError if empty.
remove
remove(
value
)
Remove an element. If not a member, raise a KeyError.
update
update(
items
)
__and__
__and__(
other
)
__contains__
__contains__(
key
)
__eq__
__eq__(
other
)
Return self==value.
__ge__
__ge__(
other
)
Return self>=value.
__gt__
__gt__(
other
)
Return self>value.
__iter__
__iter__()
__le__
__le__(
other
)
Return self<=value.
__len__
__len__()
__lt__
__lt__(
other
)
Return self<value.
__or__
__or__(
other
)
__rand__
__rand__(
other
)
__ror__
__ror__(
other
)
__rsub__
__rsub__(
other
)
__rxor__
__rxor__(
other
)
__sub__
__sub__(
other
)
__xor__
__xor__(
other
)