Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

        def tuple(*types):
    u'''
    tuple type check
    '''

    def list_check(self, obj):

        if not isinstance(obj, __builtins__['tuple']):
            return False

        if len(obj) != len(types):
            return False

        return all(isinstance(o, t) for o, t in zip(obj, types))

    return _make_checker(list_check, 'tuple[%s]' % (', '.join([x.__name__ for x in types])))
        


src/t/y/typechecker-0.1.1/typechecker/__init__.py   typechecker(Download)
 
from typeinfo import typeinfo
from utils import Callable, ContextManager, \
    Writable, Readable, \
    list as list_, tuple as tuple_, \