Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18c3ff8 commit e3e3701Copy full SHA for e3e3701
1 file changed
Parser/tokenizer.c
@@ -1080,8 +1080,14 @@ indenterror(struct tok_state *tok)
1080
static int
1081
verify_identifier(char *start, char *end)
1082
{
1083
- PyObject *s = PyUnicode_DecodeUTF8(start, end-start, NULL);
1084
- int result = PyUnicode_IsIdentifier(s);
+ PyObject *s;
+ int result;
1085
+ s = PyUnicode_DecodeUTF8(start, end-start, NULL);
1086
+ if (s == NULL) {
1087
+ PyErr_Clear();
1088
+ return 0;
1089
+ }
1090
+ result = PyUnicode_IsIdentifier(s);
1091
Py_DECREF(s);
1092
return result;
1093
}
0 commit comments