picop.cyweakref#

Weakref helpers.

picop.cyweakref.weakref_check(ob)#

Return True if ob is a weak reference or proxy.

Parameters:

ob (object)

Return type:

bool

picop.cyweakref.weakref_check_proxy(ob)#

Return True if ob is a weak proxy.

Parameters:

ob (object)

Return type:

bool

picop.cyweakref.weakref_check_ref(ob)#

Return True if ob is a weak referent (PyWeakref_CheckRef).

Parameters:

ob (object)

Return type:

bool

picop.cyweakref.weakref_eq(a, b)#

Return True if weakrefs equal (referent == when alive; identity if dead).

Parameters:
Return type:

bool

picop.cyweakref.weakref_get_object(ref)#

Return the referent of ref, or None if dead (owned ref).

Parameters:

ref (object)

Return type:

object

picop.cyweakref.weakref_new_proxy(ob, callback=None)#

Return a weak proxy via PyWeakref_NewProxy.

Parameters:
Return type:

object

picop.cyweakref.weakref_new_ref(ob, callback=None)#

Return a weak reference via PyWeakref_NewRef.

Parameters:
Return type:

object