diff options
Diffstat (limited to 'Lib/typing.py')
| -rw-r--r-- | Lib/typing.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/typing.py b/Lib/typing.py index 7743c7f..135ca58 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -830,6 +830,11 @@ class ParamSpecArgs(_Final, _Immutable, _root=True): def __repr__(self): return f"{self.__origin__.__name__}.args" + def __eq__(self, other): + if not isinstance(other, ParamSpecArgs): + return NotImplemented + return self.__origin__ == other.__origin__ + class ParamSpecKwargs(_Final, _Immutable, _root=True): """The kwargs for a ParamSpec object. @@ -849,6 +854,11 @@ class ParamSpecKwargs(_Final, _Immutable, _root=True): def __repr__(self): return f"{self.__origin__.__name__}.kwargs" + def __eq__(self, other): + if not isinstance(other, ParamSpecKwargs): + return NotImplemented + return self.__origin__ == other.__origin__ + class ParamSpec(_Final, _Immutable, _TypeVarLike, _root=True): """Parameter specification variable. |
