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

All Samples(72)  |  Call(54)  |  Derive(0)  |  Import(18)

        def getKind(node):
    return node.__class__.__name__.split(".")[-1]
        


src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationFunctionStatements.py   Nuitka(Download)
from nuitka.nodes.AssignNodes import StatementAssignmentVariable
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    makeDictCreationOrConstant,
def buildFunctionNode(provider, node, source_ref):
    assert getKind( node ) == "FunctionDef"
 
    # Remove "exec" flag if any.
    source_ref = source_ref.getExecReference( False )
    def extractArg(arg):
        if getKind( arg ) == "Name":
            assert arg.annotation is None
        elif getKind( arg ) == "arg":
            if arg.annotation is not None:
                addAnnotation(
                    key   = arg.arg,
                    value = buildNode( provider, arg.annotation, source_ref )
                )
        elif getKind( arg ) == "Tuple":

src/n/u/Nuitka-0.5.1.5/nuitka/tree/ReformulationFunctionStatements.py   Nuitka(Download)
from nuitka.nodes.AssignNodes import StatementAssignmentVariable
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    makeDictCreationOrConstant,
def buildFunctionNode(provider, node, source_ref):
    assert getKind( node ) == "FunctionDef"
 
    # Remove "exec" flag if any.
    source_ref = source_ref.getExecReference( False )
    def extractArg(arg):
        if getKind( arg ) == "Name":
            assert arg.annotation is None
        elif getKind( arg ) == "arg":
            if arg.annotation is not None:
                addAnnotation(
                    key   = arg.arg,
                    value = buildNode( provider, arg.annotation, source_ref )
                )
        elif getKind( arg ) == "Tuple":

src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationAssignmentStatements.py   Nuitka(Download)
from nuitka.nodes.SliceNodes import ExpressionSliceLookup
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    makeStatementsSequenceOrStatement,
def buildExtSliceNode(provider, node, source_ref):
    elements = []
 
    for dim in node.slice.dims:
        dim_kind = getKind( dim )
 
    if hasattr( node, "ctx" ):
        assert getKind( node.ctx ) in ( "Store", "Del" )
 
    kind = getKind( node )
        )
    elif kind == "Subscript":
        slice_kind = getKind(node.slice)
 
        if slice_kind == "Index":

src/n/u/Nuitka-0.5.1.5/nuitka/tree/ReformulationAssignmentStatements.py   Nuitka(Download)
from nuitka.nodes.SliceNodes import ExpressionSliceLookup
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    makeStatementsSequenceOrStatement,
def buildExtSliceNode(provider, node, source_ref):
    elements = []
 
    for dim in node.slice.dims:
        dim_kind = getKind( dim )
 
    if hasattr( node, "ctx" ):
        assert getKind( node.ctx ) in ( "Store", "Del" )
 
    kind = getKind( node )
        )
    elif kind == "Subscript":
        slice_kind = getKind( node.slice )
 
        if slice_kind == "Index":

src/n/u/Nuitka-HEAD/nuitka/tree/Building.py   Nuitka(Download)
 
# Some helpers.
from .Helpers import (
    makeStatementsSequenceOrStatement,
    makeSequenceCreationOrConstant,
def buildSubscriptNode(provider, node, source_ref):
    # Subscript expression nodes.
 
    assert getKind( node.ctx ) == "Load", source_ref
 
    # a slice lookup with a lower and higher boundary. These things should
    # behave similar, but they are different slots.
    kind = getKind( node.slice )
 
    if kind == "Index":
def buildUnaryOpNode(provider, node, source_ref):
    if getKind( node.op ) == "Not":
        return buildBoolOpNode(
            provider   = provider,
            node       = node,
            source_ref = source_ref
        )
    else:
        return ExpressionOperationUnary(
            operator   = getKind( node.op ),

src/n/u/Nuitka-0.5.1.5/nuitka/tree/Building.py   Nuitka(Download)
 
# Some helpers.
from .Helpers import (
    makeStatementsSequenceOrStatement,
    makeSequenceCreationOrConstant,
def buildSubscriptNode(provider, node, source_ref):
    # Subscript expression nodes.
 
    assert getKind( node.ctx ) == "Load", source_ref
 
    # a slice lookup with a lower and higher boundary. These things should
    # behave similar, but they are different slots.
    kind = getKind( node.slice )
 
    if kind == "Index":
def buildUnaryOpNode(provider, node, source_ref):
    if getKind( node.op ) == "Not":
        return buildBoolOpNode(
            provider   = provider,
            node       = node,
            source_ref = source_ref
        )
    else:
        return ExpressionOperationUnary(
            operator   = getKind( node.op ),

src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationLambdaExpressions.py   Nuitka(Download)
)
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    mergeStatements,
def buildLambdaNode(provider, node, source_ref):
    assert getKind( node ) == "Lambda"
 
    parameters = buildParameterSpec( "<lambda>", node, source_ref )
 

src/n/u/Nuitka-0.5.1.5/nuitka/tree/ReformulationLambdaExpressions.py   Nuitka(Download)
)
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    mergeStatements,
def buildLambdaNode(provider, node, source_ref):
    assert getKind( node ) == "Lambda"
 
    parameters = buildParameterSpec( "<lambda>", node, source_ref )
 

src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationBooleanExpressions.py   Nuitka(Download)
)
 
from .Helpers import (
    makeStatementsSequence,
    buildNodeList,
def buildBoolOpNode(provider, node, source_ref):
    bool_op = getKind( node.op )
 
    if bool_op == "Or":
        # The "or" may be short circuit and is therefore not a plain operation

src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationClasses.py   Nuitka(Download)
from nuitka.nodes.ParameterSpecs import ParameterSpec
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    makeSequenceCreationOrConstant,
def buildClassNode(provider, node, source_ref):
    assert getKind( node ) == "ClassDef"
 
    # Python2 and Python3 are similar, but fundamentally different, so handle
    # them in dedicated code.

  1 | 2  Next