Did I find the right examples for you? yes no

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

        def is_nested(param):
    return isinstance(param, (list, tuple))
        


src/m/d/md.py-0.2/md/annotate/compiler.py   md.py(Download)
from functools import wraps
from .annotate import annotations, transfer
from .util import is_nested
 
__all__ = ('compile_annotations', )
def map_args(proc, args, tuple_ctx, name_ctx):
    return [
        map_tuple(proc, a, tuple_ctx) if is_nested(a) else proc(a, Name(a, name_ctx))
        for a in args
    ]
 
def map_tuple(proc, args, ctx):
    return Tuple([
            map_tuple(proc, a, ctx) if is_nested(a) else proc(a, Name(a, ctx))

src/m/d/md-HEAD/md/annotate/compiler.py   md(Download)
from functools import wraps
from .annotate import annotations, transfer
from .util import is_nested
 
__all__ = ('compile_annotations', )
def map_args(proc, args, tuple_ctx, name_ctx):
    return [
        map_tuple(proc, a, tuple_ctx) if is_nested(a) else proc(a, Name(a, name_ctx))
        for a in args
    ]
 
def map_tuple(proc, args, ctx):
    return Tuple([
            map_tuple(proc, a, ctx) if is_nested(a) else proc(a, Name(a, ctx))