# Path: airy/utils/functional.py
# def curry(_curried_func, *args, **kwargs):
#     def _curried(*moreargs, **morekwargs):
#         return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
#     return _curried
# 
# class Promise(object):
#     """
#     This is just a base class for the proxy class created in
#     the closure of the lazy function. It can be used to recognize
#     promises in code.
#     """
#     pass


from airy.utils.functional import curry, Promise

    encode = curry(_proxy_method, method = unicode.encode)

def mark_safe(s):
    """
    Explicitly mark a string as safe for (HTML) output purposes. The returned
    object can be used everywhere a string or unicode object is appropriate.

    Can be called multiple times on a single string.
    """
    if isinstance(s, SafeData):
        return s
    if isinstance(s, str) or (isinstance(s, Promise) and s._delegate_str):
        return SafeString(s)
    if isinstance(s, (unicode, Promise)):
        return SafeUnicode(s)
    return SafeString(str(s))

def mark_for_escaping(s):
    """
    Explicitly mark a string as requiring HTML escaping upon output. Has no
    effect on SafeData subclasses.

    Can be called multiple times on a single string (the resulting escaping is
    only applied once).
    """
    if isinstance(s, (SafeData, EscapeData)):
        return s
    if isinstance(s, str) or (isinstance(s, Promise) and s._delegate_str):
        return EscapeString(s)

# Path: airy/utils/functional.py
# def curry(_curried_func, *args, **kwargs):
#     def _curried(*moreargs, **morekwargs):
#         return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
#     return _curried
# 
# class Promise(object):
#     """
#     This is just a base class for the proxy class created in
#     the closure of the lazy function. It can be used to recognize
#     promises in code.
#     """
#     pass


# Path: airy/utils/safestring.py
from airy.utils.functional import curry, Promise


    encode = curry(_proxy_method, method = unicode.encode)

def mark_safe(s):
    """
    Explicitly mark a string as safe for (HTML) output purposes. The returned
    object can be used everywhere a string or unicode object is appropriate.

    Can be called multiple times on a single string.
    """
    if isinstance(s, SafeData):
        return s
    if isinstance(s, str) or (isinstance(s, Promise) and s._delegate_str):
        return SafeString(s)
    if isinstance(s, (unicode, Promise)):
        return SafeUnicode(s)
    return SafeString(str(s))

def mark_for_escaping(s):
    """
    Explicitly mark a string as requiring HTML escaping upon output. Has no
    effect on SafeData subclasses.

    Can be called multiple times on a single string (the resulting escaping is
    only applied once).
    """
    if isinstance(s, (SafeData, EscapeData)):
        return s
    if isinstance(s, str) or (isinstance(s, Promise) and s._delegate_str):
        return EscapeString(s)

    if isinstance(s, (unicode, Promise)):