'Capture constraint object
:type capture_group: CaptureGroup'

def __init__(self, capture_group, constraint_type, comparisons=None, target=None, **kwargs):

    self.capture_group = capture_group
    self.constraint_type = constraint_type
    self.target = target
    self.comparisons = (comparisons if comparisons else [])
    self.kwargs = {}
    for (orig_key, value) in kwargs.items():
        key = orig_key.split('__')
        if (len(key) != 2):
            self.kwargs[orig_key] = value
            continue
        (name, method) = key
        method = ('constraint_match_' + method)
        if (not hasattr(self, method)):
            self.kwargs[orig_key] = value
            continue
        self.comparisons.append((name, getattr(self, method), value))
