On Sun, Mar 29, 2015 at 7:38 AM, <humbed...@apache.org> wrote:
>...

> +++ steve/trunk/pysteve/lib/backends/es.py Sun Mar 29 12:38:08 2015
>
>...

> +constants.appendBackend( {
> +    'id': 'elasticsearch',
> +    'init': init,
> +    'document_exists': exists,
> +    'get_basedata': getBasedata,
> +    'election_close': close,
> +    'election_vote': vote,
> +    'election_list': listElections,
> +    'issue_list': listIssues,
> +    'election_create': createElection,
> +    'issue_create': createIssue,
> +    'issue_delete': deleteIssue,
> +    'election_update': updateElection,
> +    'issue_update': updateIssue,
> +    'issue_get': getIssue,
> +    'vote': vote,
> +    'votes_get': getVotes,
> +    'votes_get_raw': getVotesRaw,
> +    'voter_get_uid': voter_get,
> +    'voter_add': voter_add,
> +    'voter_remove': voter_remove,
> +    'voter_has_voted': voter_has_voted
> +})
>

Why a dictionary mapping names to functions? .. that is why we have classes.

-g

Reply via email to