-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docstring of "type" could use an update #89555
Comments
The docstring of the "type" builtin is mildly confusing. Here's what the first few lines of the output for class type(object)
| type(object_or_name, bases, dict)
| type(object) -> the object's type
| type(name, bases, dict) -> a new type The first line there seems redundant, and potentially misleading, since it suggests that The third line is missing mention of possible keyword arguments. |
Larry: the first line was introduced in bpo-20189. Does it still make sense to keep it at this point? |
Removing it makes sense to me. Not sure what I was thinking, way back when. Thanks for catching--and volunteering to fix--this! |
It's unclear what the original comment was about. BPO-20189 is somewhat cryptic to me too. >>> inspect.signature(type)
Traceback (most recent call last):
...
ValueError: no signature found for builtin <class 'type'> In fact, there's open issues on that, like BPO-44618. |
Thanks, Mark! ✨ 🍰 ✨ |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: