mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
gh-117110: Fix subclasses of typing.Any with custom constructors (#117111)
This commit is contained in:
parent
a17f313e39
commit
8eec7ed714
3 changed files with 22 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue