Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(9)  |  Derive(0)  |  Import(7)
A function call

        def Call(func_name, args=None, prefix=None):
    """A function call"""
    node = Node(syms.power, [func_name, ArgList(args)])
    if prefix is not None:
        node.prefix = prefix
    return node
        


src/p/y/py3kwarn-HEAD/py3kwarn2to3/fixes/fix_callable.py   py3kwarn(Download)
# Local imports
from py3kwarn2to3 import fixer_base
from py3kwarn2to3.fixer_util import Call, Name, String, Attr, touch_import
 
class FixCallable(fixer_base.BaseFix):
        args = [func.clone(), String(u', ')]
        args.extend(Attr(Name(u'collections'), Name(u'Callable')))
        return Call(Name(u'isinstance'), args, prefix=node.prefix)
 

src/p/y/py3kwarn-0.4.4/py3kwarn2to3/fixes/fix_callable.py   py3kwarn(Download)
# Local imports
from py3kwarn2to3 import fixer_base
from py3kwarn2to3.fixer_util import Call, Name, String, Attr, touch_import
 
class FixCallable(fixer_base.BaseFix):
        args = [func.clone(), String(u', ')]
        args.extend(Attr(Name(u'collections'), Name(u'Callable')))
        return Call(Name(u'isinstance'), args, prefix=node.prefix)
 

src/p/y/py3kwarn-HEAD/py3kwarn2to3/fixes/fix_operator.py   py3kwarn(Download)
 
from py3kwarn2to3 import fixer_base
from py3kwarn2to3.fixer_util import Call, Name, String, touch_import
 
 
    def _isCallable(self, node, results):
        obj = results["obj"]
        args = [obj.clone(), String(u", "), String(u"'__call__'")]
        return Call(Name(u"hasattr"), args, prefix=node.prefix)
 
    def _handle_type2abc(self, node, results, module, abc):
        touch_import(None, module, node)
        obj = results["obj"]
        args = [obj.clone(), String(u", " + u".".join([module, abc]))]
        return Call(Name(u"isinstance"), args, prefix=node.prefix)

src/p/y/py3kwarn-0.4.4/py3kwarn2to3/fixes/fix_operator.py   py3kwarn(Download)
 
from py3kwarn2to3 import fixer_base
from py3kwarn2to3.fixer_util import Call, Name, String, touch_import
 
 
    def _isCallable(self, node, results):
        obj = results["obj"]
        args = [obj.clone(), String(u", "), String(u"'__call__'")]
        return Call(Name(u"hasattr"), args, prefix=node.prefix)
 
    def _handle_type2abc(self, node, results, module, abc):
        touch_import(None, module, node)
        obj = results["obj"]
        args = [obj.clone(), String(u", " + u".".join([module, abc]))]
        return Call(Name(u"isinstance"), args, prefix=node.prefix)

src/p/y/py3kwarn-HEAD/py3kwarn2to3/fixes/fix_exitfunc.py   py3kwarn(Download)
 
from py3kwarn2to3 import pytree, fixer_base
from py3kwarn2to3.fixer_util import Name, Attr, Call, Comma, Newline, syms
 
 
                               Attr(Name(u"atexit"), Name(u"register"))
                               )
        call = Call(register, [func], node.prefix)
        node.replace(call)
 

src/p/y/py3kwarn-0.4.4/py3kwarn2to3/fixes/fix_exitfunc.py   py3kwarn(Download)
 
from py3kwarn2to3 import pytree, fixer_base
from py3kwarn2to3.fixer_util import Name, Attr, Call, Comma, Newline, syms
 
 
                               Attr(Name(u"atexit"), Name(u"register"))
                               )
        call = Call(register, [func], node.prefix)
        node.replace(call)
 

src/p/y/py3kwarn-HEAD/py3kwarn2to3/tests/test_util.py   py3kwarn(Download)
from py3kwarn2to3.pytree import Node, Leaf
from py3kwarn2to3 import fixer_util
from py3kwarn2to3.fixer_util import Attr, Name, Call, Comma
from py3kwarn2to3.pgen2 import token
 
                children.append(Comma())
            children.pop()
        return Call(Name(name), children, prefix)
 
    def test(self):