diff options
-rw-r--r-- | Objects/complexobject.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index b141f2f..197aa6d 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -606,11 +606,8 @@ complex_getattr(self, name) return (object *)newfloatobject(self->cval.real); else if (strcmp(name, "imag") == 0) return (object *)newfloatobject(self->cval.imag); - else if (strcmp(name, "conj") == 0) { - cval.real = self->cval.real; - cval.imag = -self->cval.imag; - return (object *)newcomplexobject(cval); - } + else if (strcmp(name, "__members__") == 0) + return mkvalue("[ss]", "imag", "real"); return findmethod(complex_methods, (object *)self, name); } |