# Path: pyknow/conditionalelement.py
# class ConditionalElement(tuple):
#     """Base Conditional Element"""
# 
#     def __new__(cls, *args):
#         return super(ConditionalElement, cls).__new__(cls, args)
# 
#     def __repr__(self):  # pragma: no cover
#         return "%s%s" % (self.__class__.__name__, super().__repr__())
# 
# Path: pyknow/fieldconstraint.py
# class P(Bindable, FieldConstraint):
#     """Predicate Field Constraint"""
#     def __new__(cls, match, __bind__=None):
#         if not isinstance(match, Callable):
#             raise TypeError("PredicateFC needs a callable.")
#         else:
#             obj = super(P, cls).__new__(cls, match)
#             obj.__bind__ = __bind__
#             return obj
# 
#     @property
#     def match(self):
#         return self[0]


from itertools import chain
from .conditionalelement import ConditionalElement
from .fieldconstraint import P
import operator as op
import re
import fnmatch
    """
    The BETWEEN operator selects values within a given range.
    The BETWEEN operator is inclusive: begin and end values are included.

    """
    if any((isinstance(x, ConditionalElement) for x in (a, b))):
        raise TypeError(
            "A ConditionalElement can't be used as an operator condition.")
    else:
        return P(lambda x: a <= x <= b)


class _CALL:
    """
    Syntactic sugar for predicates which invoque functions who call a captured
    value method.

    >>> @Rule(Fact(quantity=P(lambda q: q.isnumeric()))
        def something(...):
            ...

    Is equivalent to:

    >>> @Rule(Fact(quantity=CALL.isnumeric()))
        def something(...):
            ...

    """
    def __getattr__(self, name):
        def _call(*args, **kwargs):

# Path: pyknow/conditionalelement.py
# class ConditionalElement(tuple):
#     """Base Conditional Element"""
# 
#     def __new__(cls, *args):
#         return super(ConditionalElement, cls).__new__(cls, args)
# 
#     def __repr__(self):  # pragma: no cover
#         return "%s%s" % (self.__class__.__name__, super().__repr__())
# 
# Path: pyknow/fieldconstraint.py
# class P(Bindable, FieldConstraint):
#     """Predicate Field Constraint"""
#     def __new__(cls, match, __bind__=None):
#         if not isinstance(match, Callable):
#             raise TypeError("PredicateFC needs a callable.")
#         else:
#             obj = super(P, cls).__new__(cls, match)
#             obj.__bind__ = __bind__
#             return obj
# 
#     @property
#     def match(self):
#         return self[0]


# Path: pyknow/operator.py
from itertools import chain
from .conditionalelement import ConditionalElement
from .fieldconstraint import P
import operator as op
import re
import fnmatch

    """
    The BETWEEN operator selects values within a given range.
    The BETWEEN operator is inclusive: begin and end values are included.

    """
    if any((isinstance(x, ConditionalElement) for x in (a, b))):
        raise TypeError(
            "A ConditionalElement can't be used as an operator condition.")
    else:
        return P(lambda x: a <= x <= b)


class _CALL:
    """
    Syntactic sugar for predicates which invoque functions who call a captured
    value method.

    >>> @Rule(Fact(quantity=P(lambda q: q.isnumeric()))
        def something(...):
            ...

    Is equivalent to:

    >>> @Rule(Fact(quantity=CALL.isnumeric()))
        def something(...):
            ...

    """
    def __getattr__(self, name):
        def _call(*args, **kwargs):

            if any((isinstance(x, ConditionalElement)