parameters: (value, *args, **keywargs)
return_statement: return (value, args, keywargs)
docstring: A function that exists for test purposes.
      
      >>> checks = [
      ...     '3, 6, min=1, max=3, test=list(a, b, c)',
      ...     '3',
      ...     '3, 6',
      ...     '3,',
      ...     'min=1, test="a b c"',
      ...     'min=5, test="a, b, c"',
      ...     'min=1, max=3, test="a, b, c"',
      ...     'min=-100, test=-99',
      ...     'min=1, max=3',
      ...     '3, 6, test="36"',
      ...     '3, 6, test="a, b, c"',
      ...     '3, max=3, test=list("a", "b", "c")',
      ...     '''3, max=3, test=list("'a'", 'b', "x=(c)")''',
      ...     "test='x=fish(3)'",
      ...    ]
      >>> v = Validator({'test': _test})
      >>> for entry in checks:
      ...     print v.check(('test(%s)' % entry), 3)
      (3, ('3', '6'), {'test': ['a', 'b', 'c'], 'max': '3', 'min': '1'})
      (3, ('3',), {})
      (3, ('3', '6'), {})
      (3, ('3',), {})
      (3, (), {'test': 'a b c', 'min': '1'})
      (3, (), {'test': 'a, b, c', 'min': '5'})
      (3, (), {'test': 'a, b, c', 'max': '3', 'min': '1'})
      (3, (), {'test': '-99', 'min': '-100'})
      (3, (), {'max': '3', 'min': '1'})
      (3, ('3', '6'), {'test': '36'})
      (3, ('3', '6'), {'test': 'a, b, c'})
      (3, ('3',), {'test': ['a', 'b', 'c'], 'max': '3'})
      (3, ('3',), {'test': ["'a'", 'b', 'x=(c)'], 'max': '3'})
      (3, (), {'test': 'x=fish(3)'})
      
      >>> v = Validator()
      >>> v.check('integer(default=6)', '3')
      3
      >>> v.check('integer(default=6)', None, True)
      6
      >>> v.get_default_value('integer(default=6)')
      6
      >>> v.get_default_value('float(default=6)')
      6.0
      >>> v.get_default_value('pass(default=None)')
      >>> v.get_default_value("string(default='None')")
      'None'
      >>> v.get_default_value('pass')
      Traceback (most recent call last):
      KeyError: 'Check "pass" has no default value.'
      >>> v.get_default_value('pass(default=list(1, 2, 3, 4))')
      ['1', '2', '3', '4']
      
      >>> v = Validator()
      >>> v.check("pass(default=None)", None, True)
      >>> v.check("pass(default='None')", None, True)
      'None'
      >>> v.check('pass(default="None")', None, True)
      'None'
      >>> v.check('pass(default=list(1, 2, 3, 4))', None, True)
      ['1', '2', '3', '4']
      
      Bug test for unicode arguments
      >>> v = Validator()
      >>> v.check(u'string(min=4)', u'test')
      u'test'
      
      >>> v = Validator()
      >>> v.get_default_value(u'string(min=4, default="1234")')
      u'1234'
      >>> v.check(u'string(min=4, default="1234")', u'test')
      u'test'
      
      >>> v = Validator()
      >>> default = v.get_default_value('string(default=None)')
      >>> default == None
      1
docstring_summary: A function that exists for test purposes.
      
      >>> checks = [
      ...     '3, 6, min=1, max=3, test=list(a, b, c)',
      ...     '3',
      ...     '3, 6',
      ...     '3,',
      ...     'min=1, test="a b c"',
      ...     'min=5, test="a, b, c"',
      ...     'min=1, max=3, test="a, b, c"',
      ...     'min=-100, test=-99',
      ...     'min=1, max=3',
      ...     '3, 6, test="36"',
      ...     '3, 6, test="a, b, c"',
      ...     '3, max=3, test=list("a", "b", "c")',
      ...     '''3, max=3, test=list("'a'", 'b', "x=(c)")''',
      ...     "test='x=fish(3)'",
      ...    ]
      >>> v = Validator({'test': _test})
      >>> for entry in checks:
      ...     print v.check(('test(%s)' % entry), 3)
      (3, ('3', '6'), {'test': ['a', 'b', 'c'], 'max': '3', 'min': '1'})
      (3, ('3',), {})
      (3, ('3', '6'), {})
      (3, ('3',), {})
      (3, (), {'test': 'a b c', 'min': '1'})
      (3, (), {'test': 'a, b, c', 'min': '5'})
      (3, (), {'test': 'a, b, c', 'max': '3', 'min': '1'})
      (3, (), {'test': '-99', 'min': '-100'})
      (3, (), {'max': '3', 'min': '1'})
      (3, ('3', '6'), {'test': '36'})
      (3, ('3', '6'), {'test': 'a, b, c'})
      (3, ('3',), {'test': ['a', 'b', 'c'], 'max': '3'})
      (3, ('3',), {'test': ["'a'", 'b', 'x=(c)'], 'max': '3'})
      (3, (), {'test': 'x=fish(3)'})
      
      >>> v = Validator()
      >>> v.check('integer(default=6)', '3')
      3
      >>> v.check('integer(default=6)', None, True)
      6
      >>> v.get_default_value('integer(default=6)')
      6
      >>> v.get_default_value('float(default=6)')
      6.0
      >>> v.get_default_value('pass(default=None)')
      >>> v.get_default_value("string(default='None')")
      'None'
      >>> v.get_default_value('pass')
      Traceback (most recent call last):
      KeyError: 'Check "pass" has no default value.'
      >>> v.get_default_value('pass(default=list(1, 2, 3, 4))')
      ['1', '2', '3', '4']
      
      >>> v = Validator()
      >>> v.check("pass(default=None)", None, True)
      >>> v.check("pass(default='None')", None, True)
      'None'
      >>> v.check('pass(default="None")', None, True)
      'None'
      >>> v.check('pass(default=list(1, 2, 3, 4))', None, True)
      ['1', '2', '3', '4']
      
      Bug test for unicode arguments
      >>> v = Validator()
      >>> v.check(u'string(min=4)', u'test')
      u'test'
      
      >>> v = Validator()
      >>> v.get_default_value(u'string(min=4, default="1234")')
      u'1234'
      >>> v.check(u'string(min=4, default="1234")', u'test')
      u'test'
      
      >>> v = Validator()
      >>> default = v.get_default_value('string(default=None)')
      >>> default == None
      1
docstring_tokens: A function that exists for test purposes . >>> checks = [ ... 3 6 min = 1 max = 3 test = list ( a b c ) ... 3 ... 3 6 ... 3 ... min = 1 test = a b c ... min = 5 test = a b c ... min = 1 max = 3 test = a b c ... min = - 100 test = - 99 ... min = 1 max = 3 ... 3 6 test = 36 ... 3 6 test = a b c ... 3 max = 3 test = list ( a b c ) ... 3 max = 3 test = list ( a b x = ( c ) ) ... test = x = fish ( 3 ) ... ] >>> v = Validator ( { test : _test } ) >>> for entry in checks : ... print v . check (( test ( %s ) % entry ) 3 ) ( 3 ( 3 6 ) { test : [ a b c ] max : 3 min : 1 } ) ( 3 ( 3 ) {} ) ( 3 ( 3 6 ) {} ) ( 3 ( 3 ) {} ) ( 3 () { test : a b c min : 1 } ) ( 3 () { test : a b c min : 5 } ) ( 3 () { test : a b c max : 3 min : 1 } ) ( 3 () { test : - 99 min : - 100 } ) ( 3 () { max : 3 min : 1 } ) ( 3 ( 3 6 ) { test : 36 } ) ( 3 ( 3 6 ) { test : a b c } ) ( 3 ( 3 ) { test : [ a b c ] max : 3 } ) ( 3 ( 3 ) { test : [ a b x = ( c ) ] max : 3 } ) ( 3 () { test : x = fish ( 3 ) } ) >>> v = Validator () >>> v . check ( integer ( default = 6 ) 3 ) 3 >>> v . check ( integer ( default = 6 ) None True ) 6 >>> v . get_default_value ( integer ( default = 6 ) ) 6 >>> v . get_default_value ( float ( default = 6 ) ) 6 . 0 >>> v . get_default_value ( pass ( default = None ) ) >>> v . get_default_value ( string ( default = None ) ) None >>> v . get_default_value ( pass ) Traceback ( most recent call last ) : KeyError : Check pass has no default value . >>> v . get_default_value ( pass ( default = list ( 1 2 3 4 )) ) [ 1 2 3 4 ] >>> v = Validator () >>> v . check ( pass ( default = None ) None True ) >>> v . check ( pass ( default = None ) None True ) None >>> v . check ( pass ( default = None ) None True ) None >>> v . check ( pass ( default = list ( 1 2 3 4 )) None True ) [ 1 2 3 4 ] Bug test for unicode arguments >>> v = Validator () >>> v . check ( u string ( min = 4 ) u test ) u test >>> v = Validator () >>> v . get_default_value ( u string ( min = 4 default = 1234 ) ) u 1234 >>> v . check ( u string ( min = 4 default = 1234 ) u test ) u test >>> v = Validator () >>> default = v . get_default_value ( string ( default = None ) ) >>> default == None 1
function: def _test(value, *args, **keywargs):
      """
      A function that exists for test purposes.
      
      >>> checks = [
      ...     '3, 6, min=1, max=3, test=list(a, b, c)',
      ...     '3',
      ...     '3, 6',
      ...     '3,',
      ...     'min=1, test="a b c"',
      ...     'min=5, test="a, b, c"',
      ...     'min=1, max=3, test="a, b, c"',
      ...     'min=-100, test=-99',
      ...     'min=1, max=3',
      ...     '3, 6, test="36"',
      ...     '3, 6, test="a, b, c"',
      ...     '3, max=3, test=list("a", "b", "c")',
      ...     '''3, max=3, test=list("'a'", 'b', "x=(c)")''',
      ...     "test='x=fish(3)'",
      ...    ]
      >>> v = Validator({'test': _test})
      >>> for entry in checks:
      ...     print v.check(('test(%s)' % entry), 3)
      (3, ('3', '6'), {'test': ['a', 'b', 'c'], 'max': '3', 'min': '1'})
      (3, ('3',), {})
      (3, ('3', '6'), {})
      (3, ('3',), {})
      (3, (), {'test': 'a b c', 'min': '1'})
      (3, (), {'test': 'a, b, c', 'min': '5'})
      (3, (), {'test': 'a, b, c', 'max': '3', 'min': '1'})
      (3, (), {'test': '-99', 'min': '-100'})
      (3, (), {'max': '3', 'min': '1'})
      (3, ('3', '6'), {'test': '36'})
      (3, ('3', '6'), {'test': 'a, b, c'})
      (3, ('3',), {'test': ['a', 'b', 'c'], 'max': '3'})
      (3, ('3',), {'test': ["'a'", 'b', 'x=(c)'], 'max': '3'})
      (3, (), {'test': 'x=fish(3)'})
      
      >>> v = Validator()
      >>> v.check('integer(default=6)', '3')
      3
      >>> v.check('integer(default=6)', None, True)
      6
      >>> v.get_default_value('integer(default=6)')
      6
      >>> v.get_default_value('float(default=6)')
      6.0
      >>> v.get_default_value('pass(default=None)')
      >>> v.get_default_value("string(default='None')")
      'None'
      >>> v.get_default_value('pass')
      Traceback (most recent call last):
      KeyError: 'Check "pass" has no default value.'
      >>> v.get_default_value('pass(default=list(1, 2, 3, 4))')
      ['1', '2', '3', '4']
      
      >>> v = Validator()
      >>> v.check("pass(default=None)", None, True)
      >>> v.check("pass(default='None')", None, True)
      'None'
      >>> v.check('pass(default="None")', None, True)
      'None'
      >>> v.check('pass(default=list(1, 2, 3, 4))', None, True)
      ['1', '2', '3', '4']
      
      Bug test for unicode arguments
      >>> v = Validator()
      >>> v.check(u'string(min=4)', u'test')
      u'test'
      
      >>> v = Validator()
      >>> v.get_default_value(u'string(min=4, default="1234")')
      u'1234'
      >>> v.check(u'string(min=4, default="1234")', u'test')
      u'test'
      
      >>> v = Validator()
      >>> default = v.get_default_value('string(default=None)')
      >>> default == None
      1
      """
      return (value, args, keywargs)
function_tokens: def _test ( value , * args , * * keywargs ) : return ( value , args , keywargs )