GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-106310 - document the __signature__ attribute (#106311) · aisk/cpython@509e24d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Doc/library
    • inspect.rst
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Doc/library/inspect.rst‎

Copy file name to clipboardExpand all lines: Doc/library/inspect.rst
+5Lines changed: 5 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,9 @@ function.
640640
Accepts a wide range of Python callables, from plain functions and classes to
641641
:func:`functools.partial` objects.
642642

643+
If the passed object has a ``__signature__`` attribute, this function
644+
returns it without further computations.
645+
643646
For objects defined in modules using stringized annotations
644647
(``from __future__ import annotations``), :func:`signature` will
645648
attempt to automatically un-stringize the annotations using
@@ -763,6 +766,8 @@ function.
763766
sig = MySignature.from_callable(min)
764767
assert isinstance(sig, MySignature)
765768

769+
Its behavior is otherwise identical to that of :func:`signature`.
770+
766771
.. versionadded:: 3.5
767772

768773
.. versionadded:: 3.10

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.