fitzzftw.patch.future_314_ge.FtwMethFuncWrap¶
fromfitzzftw.patch.future_314_ge
import FtwMethFuncWrap
- class FtwMethFuncWrap[source]¶
Bases:
objectA metadata wrapper for callables (functions and methods).
This class inspects a given callable to determine its nature (function vs. method) and extracts its signature and qualified name. It provides a consistent string representation that is particularly useful for generating error messages or documentation.
- Attributes:
_len (int): Internal flag indicating if the wrapper is empty (0) or populated (1). _signature (Signature): The inspect.Signature object of the callable. _name (str): The qualified name (__qualname__) of the callable. _is_methode (bool): True if the callable is identified as a method. _is_function (bool): True if the callable is identified as a pure function.
Public Data Attributes:
True if the wrapped object is a method (ro).
True if the wrapped object is a function (ro).
True if no callable was provided during initialization (ro).
The qualified name of the callable (ro).
Public Methods:
__init__([meth_func])Initializes the wrapper and introspects the provided callable.
__len__()Returns 1 if a callable is wrapped, 0 otherwise.
__str__()Returns a formatted string of the callable including its name and signature.