weakref.ProxyType

weakref.ProxyType The type object for proxies of objects which are not callable.

weakref.getweakrefs()

weakref.getweakrefs(object) Return a list of all weak reference and proxy objects which refer to object.

weakref.proxy()

weakref.proxy(object[, callback]) Return a proxy to object which uses a weak reference. This supports use of the proxy in most contexts instead of requiring the explicit dereferencing used with weak reference objects. The returned object will have a type of either ProxyType or CallableProxyType, depending on whether object is callable. Proxy objects are not hashable regardless of the referent; this avoids a number of problems related to their fundamentally mutable nature, and prevent their u

weakref.finalize

class weakref.finalize(obj, func, *args, **kwargs) Return a callable finalizer object which will be called when obj is garbage collected. Unlike an ordinary weak reference, a finalizer will always survive until the reference object is collected, greatly simplifying lifecycle management. A finalizer is considered alive until it is called (either explicitly or at garbage collection), and after that it is dead. Calling a live finalizer returns the result of evaluating func(*arg, **kwargs), wher

weakref.CallableProxyType

weakref.CallableProxyType The type object for proxies of callable objects.

weakref.finalize.detach()

detach() If self is alive then mark it as dead and return the tuple (obj, func, args, kwargs). If self is dead then return None.

weakref.finalize.atexit

atexit A writable boolean property which by default is true. When the program exits, it calls all remaining live finalizers for which atexit is true. They are called in reverse order of creation.

weakref.finalize.alive

alive Property which is true if the finalizer is alive, false otherwise.

wave.Wave_write.writeframes()

Wave_write.writeframes(data) Write audio frames and make sure nframes is correct. It will raise an error if the output stream is not seekable and the total number of frames that have been written after data has been written does not match the previously set value for nframes. Changed in version 3.4: Any bytes-like object is now accepted.

wave.Wave_write.setparams()

Wave_write.setparams(tuple) The tuple should be (nchannels, sampwidth, framerate, nframes, comptype, compname), with values valid for the set*() methods. Sets all parameters.