Did I find the right examples for you? yes no

All Samples(7212)  |  Call(6649)  |  Derive(139)  |  Import(424)

src/h/u/hunch-sample-app-HEAD/django/dispatch/saferef.py   hunch-sample-app(Download)
            return reference
    if callable(onDelete):
        return weakref.ref(target, onDelete)
    else:
        return weakref.ref( target )
        self.deletionMethods = [onDelete]
        self.key = self.calculateKey( target )
        self.weakSelf = weakref.ref(target.im_self, remove)
        self.weakFunc = weakref.ref(target.im_func, remove)
        self.selfName = str(target.im_self)

src/p/y/PySide-1.2.2/sources/shiboken/tests/samplebinding/weakref_test.py   PySide(Download)
    def testBasic(self):
        '''ObjectType weakref'''
        obj = ObjectType()
        ref = weakref.ref(obj, self.cb)
        del obj
    def testPrivateDtor(self):
        '''PrivateDtor weakref'''
        obj = PrivateDtor.instance()
        ref = weakref.ref(obj, self.cb)
        del obj

src/p/y/PySide-1.2.2/sources/shiboken/tests/samplebinding/typedealloc_test.py   PySide(Download)
            o = Ext()
            global ref
            ref = weakref.ref(Ext, self.callback)
        scope()
        gc.collect()
    def testDeleteType(self):
        class Ext(Point):
            pass
        ref = weakref.ref(Ext, self.callback)
        del Ext

src/s/h/Shiboken-1.2.2/sources/shiboken/tests/samplebinding/weakref_test.py   Shiboken(Download)
    def testBasic(self):
        '''ObjectType weakref'''
        obj = ObjectType()
        ref = weakref.ref(obj, self.cb)
        del obj
    def testPrivateDtor(self):
        '''PrivateDtor weakref'''
        obj = PrivateDtor.instance()
        ref = weakref.ref(obj, self.cb)
        del obj

src/s/h/Shiboken-1.2.2/sources/shiboken/tests/samplebinding/typedealloc_test.py   Shiboken(Download)
            o = Ext()
            global ref
            ref = weakref.ref(Ext, self.callback)
        scope()
        gc.collect()
    def testDeleteType(self):
        class Ext(Point):
            pass
        ref = weakref.ref(Ext, self.callback)
        del Ext

src/d/i/divmod.org-HEAD/Imaginary/ExampleGame/examplegame/test/test_japanese.py   divmod.org(Download)
        """
        deletions = []
        ref = weakref.ref(self.mousehood, deletions.append)
        # This is a hack to reload the mouse since it gets its
        # _callLater set in setUp.

src/p/y/PySide-1.2.2/sources/pyside-examples/examples/graphicsview/elasticnodes.py   PySide(Download)
        self.destPoint = QtCore.QPointF()
        self.setAcceptedMouseButtons(QtCore.Qt.NoButton)
        self.source = weakref.ref(sourceNode)
        self.dest = weakref.ref(destNode)
        self.source().addEdge(self)
    def setSourceNode(self, node):
        self.source = weakref.ref(node)
        self.adjust()
 
    def destNode(self):
        return self.dest()
 
    def setDestNode(self, node):
        self.dest = weakref.ref(node)
    def __init__(self, graphWidget):
        QtGui.QGraphicsItem.__init__(self)
 
        self.graph = weakref.ref(graphWidget)
        self.edgeList = []

src/i/m/Imaginary-0.0.5/ExampleGame/examplegame/test/test_japanese.py   Imaginary(Download)
        """
        deletions = []
        ref = weakref.ref(self.mousehood, deletions.append)
        # This is a hack to reload the mouse since it gets its
        # _callLater set in setUp.

src/e/x/Examples-HEAD/examples/graphicsview/elasticnodes.py   Examples(Download)
        self.destPoint = QtCore.QPointF()
        self.setAcceptedMouseButtons(QtCore.Qt.NoButton)
        self.source = weakref.ref(sourceNode)
        self.dest = weakref.ref(destNode)
        self.source().addEdge(self)
    def setSourceNode(self, node):
        self.source = weakref.ref(node)
        self.adjust()
 
    def destNode(self):
        return self.dest()
 
    def setDestNode(self, node):
        self.dest = weakref.ref(node)
    def __init__(self, graphWidget):
        QtGui.QGraphicsItem.__init__(self)
 
        self.graph = weakref.ref(graphWidget)
        self.edgeList = []

src/d/j/django-admin-report-HEAD/example/lib/reportlab/rl_config.py   django-admin-report(Download)
def register_reset(func):
    _registered_resets[:] = [x for x in _registered_resets if x()]
    L = [x for x in _registered_resets if x() is func]
    if L: return
    from weakref import ref
    _registered_resets.append(ref(func))

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next