Sorry, I'm not suggesting you do anything more intrusive than what you're
doing already. If something 'might' have custom attributes, then it also
might not, one has to check. If it `!might` have custom attributes, then
that means it definitely doesn't and we can continue. So it's just exactly
the same check as you're doing now, except for one `not`.

On Tue, Jan 22, 2013 at 2:02 PM, raulcota <notifications@github.com> wrote:

> In numpy/core/include/numpy/arrayobject.h:
>
> > @@ -8,4 +8,13 @@
> >  #include "noprefix.h"
> >  #endif
> >
> > +//Check for exact native types that for sure do not
> > +//support array related methods. Useful for faster checks when
> > +//validating if an object supports these methods
> > +#define ISEXACT_NATIVE_PYTYPE(op) (PyList_CheckExact(op) ||  (Py_None == op) || PyTuple_CheckExact(op) || PyFloat_CheckExact(op) || PyInt_CheckExact(op) || PyString_CheckExact(op) || PyUnicode_CheckExact(op))
>
> I 'think' I understand what you mean but looks like more changes than I
> would feel comfortable doing at the moment given my lack of in-depth
> understanding of Numpy (I wrote code about what I knew for sure while
> perhaps missing other scenarios, but changing the sense would imply I know
> every time it 'might') .
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/2938/files#r2733630>.
>
>