l.r.i.p.IVoteSet(Interface) : interface documentation

Part of lp.registry.interfaces.poll View In Hierarchy

The set of all Vote objects.
Method newToken Return a token that was never used in the Vote table.
Method new Create a new Vote.
Method getByToken Return the list of votes with the given token.
Method getVotesByOption Return the number of votes the given option received.
def newToken():
Return a token that was never used in the Vote table.
def new(poll, option, preference, token, person):
Create a new Vote.
def getByToken(token):
Return the list of votes with the given token.

For polls whose type is SIMPLE, this list will contain a single vote, because in SIMPLE poll only one option can be choosen.

def getVotesByOption(option):
Return the number of votes the given option received.

Raises a TypeError if the given option doesn't belong to a simple-style poll.

API Documentation for Launchpad, generated by pydoctor at 2019-08-17 00:00:04.