Commit 1a32545
committed
Normalize ParamSpec __bound__ when bound is None
When creating a ParamSpec with bound=None, the runtime __bound__
attribute is set to <class 'NoneType'> instead of None.
This change mirrors TypeVar.__new__ by explicitly converting Py_None
to NULL before type checking, restoring the correct semantics and
ensuring consistency between TypeVar and ParamSpec.
Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>1 parent 19c72d2 commit 1a32545
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1337 | 1337 | | |
1338 | 1338 | | |
1339 | 1339 | | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
1340 | 1343 | | |
1341 | 1344 | | |
1342 | 1345 | | |
| |||
0 commit comments