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-82406: document duck-type nature of inspect.is*function by graingert · Pull Request #94987 · python/cpython

Conversation

@graingert

@graingert graingert commented Jul 18, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: iscoroutinefunction broken with cython - allow tagging of functions as async? #82406

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@graingert
pythongh-82406: document duck-type nature of inspect.is*function
559200a
@bedevere-bot bedevere-bot added the awaiting review label Jul 18, 2022
graingert
graingert commented Jul 18, 2022
View reviewed changes
Comment thread Doc/library/inspect.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@graingert
Update Doc/library/inspect.rst
864d46c
graingert
graingert commented Jul 18, 2022
View reviewed changes
Comment thread Lib/inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@graingert
comment document the implicit else branch
07d7a5f
graingert
graingert commented Jul 18, 2022
View reviewed changes
Comment thread Misc/NEWS.d/next/Core and Builtins/2022-07-18-20-47-59.gh-issue-gh-82406.IkXdhH.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@graingert
graingert force-pushed the document-duck-type-is-star-function branch from ed1273f to c8fafc0 Compare July 18, 2022 20:59
@blurb-it @graingert
📜🤖 Added by blurb_it.
3c3d198
@graingert
graingert force-pushed the document-duck-type-is-star-function branch from f722790 to 3c3d198 Compare July 18, 2022 21:01
@graingert
the inspect.is*function duck type change missed the boat for 3.10.5
b3b5301
@encukou encukou added the docs Documentation in the Doc dir label Mar 28, 2024
@github-actions

github-actions Bot commented Apr 11, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 11, 2026
@graingert
Merge branch 'main' into document-duck-type-is-star-function
afe0483
@bedevere-app bedevere-app Bot mentioned this pull request Sep 2, 2026
iscoroutinefunction broken with cython - allow tagging of functions as async? #82406
Closed
@graingert
graingert requested a review from picnixz September 2, 2026 09:20
@read-the-docs-community

read-the-docs-community Bot commented Sep 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34355716 | 📁 Comparing 2abecc3 against main (3daa7f8)

  🔍 Preview build  

8 files changed · ± 8 modified

± Modified

  • glossary.html
  • library/functions.html
  • library/inspect.html
  • library/stdtypes.html
  • library/tomllib.html
  • reference/datamodel.html
  • reference/expressions.html
  • whatsnew/changelog.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

johnslavik
johnslavik reviewed Sep 2, 2026
View reviewed changes

@johnslavik johnslavik left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider different wording, not "duck-type functions".
Maybe function-like objects? I've seen that a couple times in the docs. If we go the duck-type path, maybe link to the glossary (:term:`duck-typing`​)?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/inspect.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/inspect.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/inspect.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

graingert and others added 3 commits September 2, 2026 10:32
@graingert @johnslavik
Apply batched suggestions from code review
666abb7
Co-authored-by: Bartosz Sławecki <[email protected]>
@graingert
fix lint
04325fa
@graingert
Reword duck-type wording and finish the sentences
a651bc9
Review feedback: use "function-like objects" and link the duck-typing
glossary term rather than saying "duck-type functions".  This matches
the wording already used in the NEWS entry for pythongh-84753.
@johnslavik
johnslavik requested a review from encukou September 2, 2026 09:41
johnslavik
johnslavik reviewed Sep 2, 2026
View reviewed changes

@johnslavik johnslavik left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@encukou, what do you think?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@encukou encukou added the skip news label Sep 2, 2026
@encukou
Remove NEWS entry
2abecc3
encukou
encukou approved these changes Sep 2, 2026
View reviewed changes

@encukou encukou left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a tightly scoped PR, this makes sense.

"function-like objects now return True" technically isn't true, but the same wording is in the notes above and below.

"Duck-typed function-like objects" is vague, but if we wanted precision, that should go in the main prose, not in a versionchanged note.

I could do without the comments in inspect.py, but they're not harmful.

I removed the NEWS entry though; we don't add those for docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Sep 2, 2026
@encukou
encukou merged commit 1059e80 into python:main Sep 3, 2026
55 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 3, 2026
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 3, 2026
@encukou encukou added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Sep 3, 2026
@miss-islington-app

miss-islington-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thanks @graingert for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thanks @graingert for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thanks @graingert for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

bedevere-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

GH-156880 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Sep 3, 2026
@bedevere-app

bedevere-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

GH-156881 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 3, 2026
@bedevere-app

bedevere-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

GH-156882 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Sep 3, 2026
@graingert
graingert deleted the document-duck-type-is-star-function branch September 3, 2026 08:39
encukou pushed a commit that referenced this pull request Sep 3, 2026
@miss-islington @graingert
[3.14] gh-82406: Add 3.10.6 change notes for inspect.is*function (GH-…
e3c7518
…94987) (#156881)

Document when these functions started checking code flags for "duck-typed" function-like objects.
(cherry picked from commit 1059e80)

Co-authored-by: Thomas Grainger <[email protected]>
encukou pushed a commit that referenced this pull request Sep 3, 2026
@miss-islington @graingert
[3.13] gh-82406: Add 3.10.6 change notes for inspect.is*function (GH-…
2f6fb5f
…94987) (#156880)

Document when these functions started checking code flags for "duck-typed" function-like objects.
(cherry picked from commit 1059e80)

Co-authored-by: Thomas Grainger <[email protected]>
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Sep 12, 2026
@graingert @clin1234
pythongh-82406: Add 3.10.6 change notes for inspect.is*function (pyth…
7d35598
…onGH-94987)

Document when these functions started checking code flags for "duck-typed" function-like objects.
serhiy-storchaka pushed a commit that referenced this pull request Oct 10, 2026
@miss-islington @graingert
[3.15] gh-82406: Add 3.10.6 change notes for inspect.is*function (GH-…
5646ec8
…94987) (GH-156882)

Document when these functions started checking code flags for "duck-typed" function-like objects.
(cherry picked from commit 1059e80)

Co-authored-by: Thomas Grainger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@johnslavik johnslavik johnslavik left review comments
@encukou encukou encukou approved these changes
@picnixz picnixz Awaiting requested review from picnixz

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Docs PRs
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@graingert @encukou @johnslavik @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — 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.