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 d9728de commit 0bc0198Copy full SHA for 0bc0198
Modules/xxlimited.c
@@ -277,11 +277,7 @@ static int
277
Xxo_setattro(PyObject *self, PyObject *name, PyObject *v)
278
{
279
// filter a specific attribute name
280
- int is_reserved = PyUnicode_EqualToUTF8(name, "reserved");
281
- if (is_reserved < 0) {
282
- return -1;
283
- }
284
- else if (is_reserved) {
+ if (PyUnicode_Check(name) && PyUnicode_EqualToUTF8(name, "reserved")) {
285
PyErr_Format(PyExc_AttributeError, "cannot set %R", name);
286
return -1;
287
}
0 commit comments