inspect.Parameter.name

name The name of the parameter as a string. The name must be a valid Python identifier.

inspect.Parameter.replace()

replace(*[, name][, kind][, default][, annotation]) Create a new Parameter instance based on the instance replaced was invoked on. To override a Parameter attribute, pass the corresponding argument. To remove a default value or/and an annotation from a Parameter, pass Parameter.empty. >>> from inspect import Parameter >>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42) >>> str(param) 'foo=42' >>> str(param.replace()) # Will create a shallow c

inspect.Parameter.annotation

annotation The annotation for the parameter. If the parameter has no annotation, this attribute is set to Parameter.empty.

inspect.isroutine()

inspect.isroutine(object) Return true if the object is a user-defined or built-in function or method.

inspect.istraceback()

inspect.istraceback(object) Return true if the object is a traceback.

inspect.Parameter

class inspect.Parameter(name, kind, *, default=Parameter.empty, annotation=Parameter.empty) Parameter objects are immutable. Instead of modifying a Parameter object, you can use Parameter.replace() to create a modified copy. Changed in version 3.5: Parameter objects are picklable and hashable. empty A special class-level marker to specify absence of default values and annotations. name The name of the parameter as a string. The name must be a valid Python identifier. default

inspect.Parameter.empty

empty A special class-level marker to specify absence of default values and annotations.

inspect.Parameter.default

default The default value for the parameter. If the parameter has no default value, this attribute is set to Parameter.empty.

inspect.isgetsetdescriptor()

inspect.isgetsetdescriptor(object) Return true if the object is a getset descriptor. CPython implementation detail: getsets are attributes defined in extension modules via PyGetSetDef structures. For Python implementations without such types, this method will always return False.

inspect.ismodule()

inspect.ismodule(object) Return true if the object is a module.