slidge.slixfix.roster#

Module Contents#

Classes#

YesSet

A pseudo-set which always test True for membership

RosterBackend

A pseudo-roster for the gateway component.

class slidge.slixfix.roster.YesSet#

A pseudo-set which always test True for membership

add()#

Add an element to a set.

This has no effect if the element is already present.

clear()#

Remove all elements from this set.

copy()#

Return a shallow copy of a set.

difference()#

Return the difference of two or more sets as a new set.

(i.e. all elements that are in this set but not the others.)

difference_update()#

Remove all elements of another set from this set.

discard()#

Remove an element from a set if it is a member.

Unlike set.remove(), the discard() method does not raise an exception when an element is missing from the set.

intersection()#

Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

intersection_update()#

Update a set with the intersection of itself and another.

isdisjoint()#

Return True if two sets have a null intersection.

issubset()#

Test whether every element in the set is in other.

issuperset()#

Test whether every element in other is in the set.

pop()#

Remove and return an arbitrary set element. Raises KeyError if the set is empty.

remove()#

Remove an element from a set; it must be a member.

If the element is not a member, raise a KeyError.

symmetric_difference()#

Return the symmetric difference of two sets as a new set.

(i.e. all elements that are in exactly one of the sets.)

symmetric_difference_update()#

Update a set with the symmetric difference of itself and another.

union()#

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

update()#

Update a set with the union of itself and others.

class slidge.slixfix.roster.RosterBackend#

A pseudo-roster for the gateway component.

If a user is in the user store, this will behave as if the user is part of the roster with subscription “both”, and “none” otherwise.

This is rudimentary but the only sane way I could come up with so far.