Again perhaps the end of [#460020] bug or feature: unicode() and subclasses.

Inhibited complex unary plus optimization when applied to a complex subtype.
Added PyComplex_CheckExact macro.  Some comments and minor code fiddling.
This commit is contained in:
Tim Peters 2001-09-12 19:12:49 +00:00
parent 1140cb2b9e
commit 2400fa4ad1
4 changed files with 45 additions and 12 deletions

View file

@ -659,7 +659,7 @@ float_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
tmp = float_new(&PyFloat_Type, args, kwds);
if (tmp == NULL)
return NULL;
assert(PyFloat_Check(tmp));
assert(PyFloat_CheckExact(tmp));
new = type->tp_alloc(type, 0);
if (new == NULL)
return NULL;