Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixes #117110
The superclass of `typing.Any` is `object` and `object.__new__(...)` doesn't accept additional argument beyond the first argument `cls`.
  • Loading branch information
Azureblade3808 authored Mar 21, 2024
commit bb230b091e98c396b545cf95a7253c157b2c2ba1
2 changes: 1 addition & 1 deletion Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class Any(metaclass=_AnyMeta):
def __new__(cls, *args, **kwargs):
if cls is Any:
raise TypeError("Any cannot be instantiated")
return super().__new__(cls, *args, **kwargs)
return super().__new__(cls)


@_SpecialForm
Expand Down