1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. module:: wx.lib.pubsub.core.weakmethod
.. currentmodule:: wx.lib.pubsub.core.weakmethod
.. highlight:: python
.. _wx.lib.pubsub.core.weakmethod:
==========================================================================================================================================
|phoenix_title| **wx.lib.pubsub.core.weakmethod**
==========================================================================================================================================
This module provides a basic "weak method" implementation, WeakMethod. It uses
weakref.WeakRef which, used on its own, produces weak methods that are dead on
creation, not very useful. Use the getWeakRef(object) module function to create the
proper type of weak reference (weakref.WeakRef or WeakMethod) for given object.
:copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE_BSD_Simple.txt for details.
|function_summary| Functions Summary
====================================
================================================================================ ================================================================================
:func:`~wx.lib.pubsub.core.weakmethod.getWeakRef` Get a weak reference to obj. If obj is a bound method, a WeakMethod
================================================================================ ================================================================================
|
|class_summary| Classes Summary
===============================
================================================================================ ================================================================================
:ref:`~wx.lib.pubsub.core.weakmethod.WeakMethod` Represent a weak bound method, i.e. a method which doesn't keep alive the
================================================================================ ================================================================================
|
.. toctree::
:maxdepth: 1
:hidden:
wx.lib.pubsub.core.weakmethod.WeakMethod
Functions
------------
.. function:: getWeakRef(obj, notifyDead=None)
Get a weak reference to obj. If obj is a bound method, a WeakMethod
object, that behaves like a WeakRef, is returned; if it is
anything else a WeakRef is returned. If obj is an unbound method,
a ValueError will be raised.
|