# Path: native_tags/decorators.py
# def tag(bucket, doc):
#     def wrapped(inner, **options):


    from sets import Set as set
from django.conf import settings
from native_tags.decorators import comparison
less = comparison(less, test={'args':(0,1)})

def less_or_equal(x,y):
    'True if x is less than or equal to y'
    return x <= y
less_or_equal = comparison(less_or_equal, test={'args':(1,1)})

def greater_or_equal(x,y):
    'True if x is greater than or equal to y'
    return x >= y
greater_or_equal = comparison(greater_or_equal, test={'args':(2,1)})

def greater(x,y):
    'True if x is greater than y'
    return x > y
greater = comparison(greater, test={'args':(2,1)})
    
def startswith(x,y):
    'String comparison. True if x startswith y'
    return x.startswith(y)
startswith = comparison(startswith, test={'args':('wtf','w')})

def endswith(x,y):
    'String comparison. True if x endswith y'
    return x.endswith(y)
endswith = comparison(endswith, test={'args':('wtf','f')})

def contains(x,y):
    'String comparison. True if x contains y anywhere'
    return x.find(y) > -1

# Path: native_tags/decorators.py
# def tag(bucket, doc):
#     def wrapped(inner, **options):


# Path: native_tags/contrib/comparison.py
    from sets import Set as set
from django.conf import settings
from native_tags.decorators import comparison

less = comparison(less, test={'args':(0,1)})

def less_or_equal(x,y):
    'True if x is less than or equal to y'
    return x <= y
less_or_equal = comparison(less_or_equal, test={'args':(1,1)})

def greater_or_equal(x,y):
    'True if x is greater than or equal to y'
    return x >= y
greater_or_equal = comparison(greater_or_equal, test={'args':(2,1)})

def greater(x,y):
    'True if x is greater than y'
    return x > y
greater = comparison(greater, test={'args':(2,1)})
    
def startswith(x,y):
    'String comparison. True if x startswith y'
    return x.startswith(y)
startswith = comparison(startswith, test={'args':('wtf','w')})

def endswith(x,y):
    'String comparison. True if x endswith y'
    return x.endswith(y)
endswith = comparison(endswith, test={'args':('wtf','f')})

def contains(x,y):
    'String comparison. True if x contains y anywhere'
    return x.find(y) > -1

contains = comparison(contains, test={'args':('wtf','t')})