diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2024-06-17 15:01:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-17 15:01:49 (GMT) |
commit | 7c47f93dff878bdc43f5162dd878cbb375711570 (patch) | |
tree | 7b02b412d2bc0f718d9df2912fa0b6cd66205de1 /Modules | |
parent | 03b89e3a3d155a06827f58d51238a731d8800cc9 (diff) | |
download | cpython-7c47f93dff878bdc43f5162dd878cbb375711570.zip cpython-7c47f93dff878bdc43f5162dd878cbb375711570.tar.gz cpython-7c47f93dff878bdc43f5162dd878cbb375711570.tar.bz2 |
[3.13] gh-119933: Improve ``SyntaxError`` message for invalid type parameters expressions (GH-119976) (#120641)
(cherry picked from commit 4bf17c381fb7b465f0f26aecb94a6c54cf9be2d3)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/symtablemodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/symtablemodule.c b/Modules/symtablemodule.c index b4dbb54..00e650a 100644 --- a/Modules/symtablemodule.c +++ b/Modules/symtablemodule.c @@ -88,11 +88,11 @@ symtable_init_constants(PyObject *m) return -1; if (PyModule_AddIntConstant(m, "TYPE_ANNOTATION", AnnotationBlock) < 0) return -1; - if (PyModule_AddIntConstant(m, "TYPE_TYPE_VAR_BOUND", TypeVarBoundBlock) < 0) - return -1; if (PyModule_AddIntConstant(m, "TYPE_TYPE_ALIAS", TypeAliasBlock) < 0) return -1; - if (PyModule_AddIntConstant(m, "TYPE_TYPE_PARAM", TypeParamBlock) < 0) + if (PyModule_AddIntConstant(m, "TYPE_TYPE_PARAMETERS", TypeParametersBlock) < 0) + return -1; + if (PyModule_AddIntConstant(m, "TYPE_TYPE_VARIABLE", TypeVariableBlock) < 0) return -1; if (PyModule_AddIntMacro(m, LOCAL) < 0) return -1; |