Classes¶
- class bootlace.util.Classes(tag: html_tag)[source]¶
Bases:
MutableSet[str]A helper for manipulating the class attribute on a tag.
Methods Summary
add(*classes)Add classes to the tag.
clear()This is slow (creates N new iterators!) but effective.
discard(value)Remove a class if it exists.
isdisjoint(other)Return True if two sets have a null intersection.
pop()Return the popped value.
remove(*classes)Remove classes from the tag.
swap(old, new)Swap one class for another.
Methods Documentation
- clear()¶
This is slow (creates N new iterators!) but effective.
- isdisjoint(other)¶
Return True if two sets have a null intersection.
- pop()¶
Return the popped value. Raise KeyError if empty.