Table Of Contents

Previous topic

validatedefnargs

Next topic

WeakMethod

This Page

phoenix_title weakmethod

This module provides a basic “weak method” implementation. It is necessary because the weakref module does not support weak methods (in the sense that, counter-intuitively, a user who creates a weakref.ref(obj.method), a reasonable action, get a weak ref that is None.

copyright:Copyright 2006-2009 by Oliver Schoenborn, all rights reserved.
license:BSD, see LICENSE.txt for details.

class_hierarchy Inheritance Diagram

Inheritance diagram for module weakmethod

Inheritance diagram of weakmethod


function_summary Functions Summary

getWeakRef Get a weak reference to obj. If obj is a bound method, a WeakMethod

class_summary Classes Summary

WeakMethod Represent a weak bound method, i.e. a method which doesn’t keep alive the

Functions



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.