Did I find the right examples for you? yes no

All Samples(16)  |  Call(11)  |  Derive(2)  |  Import(3)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/x86/ri386setup.py   plexnet(Download)
from ri386 import *
 
from pypy.objspace.std.multimethod import MultiMethodTable, InstallerVersion2
from pypy.tool.sourcetools import compile2
 
            encoder = generate_function([], self.modes[()])
        else:
            table = MultiMethodTable(arity, root_class=OPERAND,
                                     argnames_before=['builder'])
            for mm, opcodes in self.modes.items():

src/s/y/Sypy-HEAD/objspace/std/test/test_multimethod.py   Sypy(Download)
    def setup_class(cls):
        cls.prev_installer = multimethod.Installer
        multimethod.Installer = cls.Installer
        add = multimethod.MultiMethodTable(2, root_class=W_Root,
                                           argnames_before=['space'])
    def test_forbidden_subclasses(self):
        mul = multimethod.MultiMethodTable(2, root_class=W_Root,
                                           argnames_before=['space'])
        class UserW_StringObject(W_StringObject):
            pass
    def test_more_forbidden_subclasses(self):
        mul = multimethod.MultiMethodTable(2, root_class=W_Root,
                                           argnames_before=['space'])
        class UserW_StringObject(W_StringObject):
            pass
    def test_ANY(self):
        setattr = multimethod.MultiMethodTable(3, root_class=W_Root,
                                           argnames_before=['space'])
        def setattr__Int_ANY_ANY(space, w_x, w_y, w_z):
            assert space == 'space'
        def test(indices):
            sub = multimethod.MultiMethodTable(2, root_class=W_Root,
                                               argnames_before=['space'])
            def addimpl(cls1, cls2):
                token = random.random()

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/test/test_multimethod.py   plexnet(Download)
    def setup_class(cls):
        cls.prev_installer = multimethod.Installer
        multimethod.Installer = cls.Installer
        add = multimethod.MultiMethodTable(2, root_class=W_Root,
                                           argnames_before=['space'])
    def test_forbidden_subclasses(self):
        mul = multimethod.MultiMethodTable(2, root_class=W_Root,
                                           argnames_before=['space'])
        class UserW_StringObject(W_StringObject):
            pass
    def test_more_forbidden_subclasses(self):
        mul = multimethod.MultiMethodTable(2, root_class=W_Root,
                                           argnames_before=['space'])
        class UserW_StringObject(W_StringObject):
            pass
    def test_ANY(self):
        setattr = multimethod.MultiMethodTable(3, root_class=W_Root,
                                           argnames_before=['space'])
        def setattr__Int_ANY_ANY(space, w_x, w_y, w_z):
            assert space == 'space'
        def test(indices):
            sub = multimethod.MultiMethodTable(2, root_class=W_Root,
                                               argnames_before=['space'])
            def addimpl(cls1, cls2):
                token = random.random()

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/model.py   plexnet(Download)
"""
 
from pypy.objspace.std.multimethod import MultiMethodTable, FailedToImplement
from pypy.interpreter.baseobjspace import W_Root, ObjSpace
import pypy.interpreter.pycode
class StdObjSpaceMultiMethod(MultiMethodTable):
 
    def __init__(self, operatorsymbol, arity, specialnames=None, **extras):
        """NOT_RPYTHON: cannot create new multimethods dynamically.
        """

src/s/y/Sypy-HEAD/objspace/std/model.py   Sypy(Download)
"""
 
from pypy.objspace.std.multimethod import MultiMethodTable, FailedToImplement
from pypy.interpreter.baseobjspace import W_Root, ObjSpace
import pypy.interpreter.pycode
class StdObjSpaceMultiMethod(MultiMethodTable):
 
    def __init__(self, operatorsymbol, arity, specialnames=None, **extras):
        """NOT_RPYTHON: cannot create new multimethods dynamically.
        """