websauna.utils.orderedset module

OrderedSet implementation.

Courtesy of http://code.activestate.com/recipes/576694/

class websauna.utils.orderedset.OrderedSet(iterable=None)[source]

Bases: collections.abc.MutableSet

add(key)[source]

Add an element.

discard(key)[source]

Remove an element. Do not raise an exception if absent.

pop(last=True)[source]

Return the popped value. Raise KeyError if empty.