Runtime Data Attributes

method.__module__

Module metadata forwarded from the underlying Python function. This is not a guarantee that the receiver's class was defined there.

Formal Syntax & Structure

python syntaxpython
method.__module__

Return Value

str | None

Usual metadata value under ordinary construction; manually assigned metadata can differ. See description.

Working Example

Example Snippetpython
class C:    def f(self): return 7m = C().fprint(m.__module__)
Python Reference