mirror of
https://github.com/python/cpython.git
synced 2025-10-08 16:11:51 +00:00
attribute-less object is AttributeError, not TypeError
This commit is contained in:
parent
5e56997969
commit
016564ab51
1 changed files with 1 additions and 1 deletions
|
@ -254,7 +254,7 @@ getattr(v, name)
|
||||||
char *name;
|
char *name;
|
||||||
{
|
{
|
||||||
if (v->ob_type->tp_getattr == NULL) {
|
if (v->ob_type->tp_getattr == NULL) {
|
||||||
err_setstr(TypeError, "attribute-less object");
|
err_setstr(AttributeError, "attribute-less object");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue