← 返回首页
__text_signature__ for __get__ methods is wrong · Issue #93021 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

__text_signature__ for __get__ methods is wrong #93021

New issue
New issue

Description

In [18]: object.__init__.__get__.__text_signature__ Out[18]: '($self, instance, owner, /)' In [19]: object.__init__.__get__(1) Out[19]: <method-wrapper '__init__' of int object at 0x105e7d0b0> In [20]: object.__init__.__get__(1, 2) Out[20]: <method-wrapper '__init__' of int object at 0x105e7d0b0>

The signature claims there are two required positional arguments, but in fact the second argument is optional.

(Tested on 3.11 but I think it's wrong on all recent versions.)

Metadata

Metadata

Assignees

Labels

3.10only security fixes3.11only security fixes3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

  • Open in GitHub Copilot app

Footer

© 2026 GitHub, Inc.