[New-bugs-announce] [issue46676] ParamSpec args and kwargs are not equal to themselves.

Gregory Beauregard report at bugs.python.org
Mon Feb 7 14:16:53 EST 2022


New submission from Gregory Beauregard <greg at greg.red>:

from typing import ParamSpec
P = ParamSpec("P")
print(P.args == P.args)  # False
print(P.kwargs == P.kwargs)  # False

ParamSpec args and kwargs are not equal to themselves; this can cause problems for unit tests and type introspection w/ e.g. `get_type_hints`.

I will fix this by adding an __eq__ method like other places in typing.py

----------
components: Library (Lib)
messages: 412781
nosy: GBeauregard, Jelle Zijlstra
priority: normal
severity: normal
status: open
title: ParamSpec args and kwargs are not equal to themselves.
type: behavior
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46676>
_______________________________________


More information about the New-bugs-announce mailing list