diff options
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r-- | Objects/classobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 0661e81..1e6fdb6 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -619,9 +619,9 @@ instance_nonzero(self) object *func, *res; long outcome; - if ((func = instance_getattr(self, "__len__")) == NULL) { + if ((func = instance_getattr(self, "__nonzero__")) == NULL) { err_clear(); - if ((func = instance_getattr(self, "__nonzero__")) == NULL) { + if ((func = instance_getattr(self, "__len__")) == NULL) { err_clear(); /* Fall back to the default behavior: all instances are nonzero */ |