Skip to content

Dynamics

Keith Sterling edited this page Aug 22, 2017 · 5 revisions

Dynamic Sets

from abc import ABCMeta, abstractmethod

class DynamicSet(object):
    __metaclass__ = ABCMeta

    def __init__(self, config):
        self._config = config

    @property
    def config(self):
        return self._config

    @abstractmethod
    def is_member(self, bot, clientid, value):
        raise NotImplemented()

Dynamic Maps

from abc import ABCMeta, abstractmethod

class DynamicMap(object):
    __metaclass__ = ABCMeta

    def __init__(self, config):
        self._config = config

    @property
    def config(self):
        return self._config

    @abstractmethod
    def map_value(self, bot, clientid, value):
        raise NotImplemented()

Dynamic Variables

from abc import ABCMeta, abstractmethod


class DynamicVariable(object):
    __metaclass__ = ABCMeta

    def __init__(self, config):
        self._config = config

    @property
    def config(self):
        return self._config

    @abstractmethod
    def get_value(self, bot, clientid, value):
        raise NotImplemented()
Clone this wiki locally