Did I find the right examples for you? yes no

All Samples(6)  |  Call(0)  |  Derive(4)  |  Import(2)
Base class for transformations that want to intercept on specific
builtin functions or methods of builtin types, including special
methods triggered by Python operators.  Must run after declaration
analysis when entries were assigned.

Naming pattern for handler methods is as follows:

* builtin functions: _handle_(general|simple|any)_function_NAME

* builtin methods: _handle_(general|simple|any)_method_TYPENAME_METHODNAME

src/c/y/cython-HEAD/Cython/Compiler/Tests/TestVisitor.py   cython(Download)
from Cython.Compiler.ModuleNode import ModuleNode
from Cython.Compiler.Symtab import ModuleScope
from Cython.TestUtils import TransformTest
from Cython.Compiler.Visitor import MethodDispatcherTransform
from Cython.Compiler.ParseTreeTransforms import (
        class Test(MethodDispatcherTransform):
            def _handle_simple_method_dict_get(self, node, func, args, unbound):
                calls[0] += 1
                return node
 
        class Test(MethodDispatcherTransform):
            def _handle_simple_method_bytes___mul__(self, node, func, args, unbound):
                calls['bytes'] += 1
                return node
            def _handle_simple_method_object___mul__(self, node, func, args, unbound):

src/c/y/Cython-0.20.1/Cython/Compiler/Tests/TestVisitor.py   Cython(Download)
from Cython.Compiler.ModuleNode import ModuleNode
from Cython.Compiler.Symtab import ModuleScope
from Cython.TestUtils import TransformTest
from Cython.Compiler.Visitor import MethodDispatcherTransform
from Cython.Compiler.ParseTreeTransforms import (
        class Test(MethodDispatcherTransform):
            def _handle_simple_method_dict_get(self, node, func, args, unbound):
                calls[0] += 1
                return node
 
        class Test(MethodDispatcherTransform):
            def _handle_simple_method_bytes___mul__(self, node, func, args, unbound):
                calls['bytes'] += 1
                return node
            def _handle_simple_method_object___mul__(self, node, func, args, unbound):