class expect:
    matchers = {}

    def __init__(self, object):
        self.object = object
        self.__setup_chaining()

    @classmethod
    def register(self, name, klass):
        self.matchers[name] = klass
        method = lambda self, other=None: klass(self.object, other).match()
        setattr(self, name, method)

    @classmethod
    def matcher(self, name):
        return self.matchers[name]

    @classmethod
    def unregister(self, name):
        delattr(self, name)
        pass

    @classmethod
    def registered(self, name):
        try:
            getattr(self, name)
        except AttributeError:
            return False
        else:
            return True

    def __setup_chaining(self):
        self.to = self
        self.be = self
        self.a  = self
        self.an = self

@@ -801,16 +801,131 @@
  self.an = self%0A
+%0A%22%22%22%0ATODO:%0A%0A- respond to%0A- truthy/falsy%0A- None, string, int etc%0A- empty, length%0A- above/below/within, close to%0A%22%22%22%0A

Add a todo list