mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Return -1 for errors.
This commit is contained in:
parent
6c4f4a92ac
commit
73531a3bae
3 changed files with 3 additions and 3 deletions
|
@ -107,7 +107,7 @@ module_setattr(m, name, v)
|
|||
{
|
||||
if (strcmp(name, "__dict__") == 0 || strcmp(name, "__name__") == 0) {
|
||||
err_setstr(NameError, "can't assign to reserved member name");
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
if (v == NULL)
|
||||
return dictremove(m->md_dict, name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue