PyDocs

Nav

Python Runtime Services

Signature.format

inspect

method of Signature · Added in 3.13 (source)
  • Signature.format(*, max_width=None, quote_annotation_strings=True)
Create a string representation of the Signature object.

If *max_width* integer is passed,
signature will try to fit into the *max_width*.
If signature is longer than *max_width*,
all parameters will be on separate lines.

If *quote_annotation_strings* is False, annotations
in the signature are displayed without opening and closing quotation
marks. This is useful when the signature was created with the
STRING format or when ``from __future__ import annotations`` was used.
Changed in 3.14
  • 3.14: The unquote_annotations parameter was added.
0 Examples
No examples for inspect/Signature.format.
See Also
No see-alsos for inspect/Signature.format
0 Notes
No notes for Signature.format