On Fri, Jan 28, 2011 at 9:39 PM, Stefan Behnel <stefan...@behnel.de> wrote:
> Robert Bradshaw, 29.01.2011 01:55:
>> On Fri, Jan 28, 2011 at 3:38 PM, Dominic Sacré wrote:
>>> On Fri, Jan 28, 2011 at 11:40 AM, Robert Bradshaw wrote:
>>>> New candidate up at http://cython.org/release/Cython-0.14.1rc3.tar.gz
>>>
>>> Is it just me, or do the release candidates break isinstance() when
>>> testing against a tuple of multiple types? When I do isinstance(x,
>>> (Foo, Bar)) a Foo object will be recognized, but a Bar object will
>>> not. The same code used to work fine in older versions, including
>>> 0.14.
>>
>> Thanks for the report. I did fix one isinstance bug, perhaps I
>> introduced another one (though I thought I tested this...). I'll make
>> sure this works before release.
>
> My bad. There was code in Optimize.py, line 2003:
>
>             if type_check_function not in tests:
>                 tests.append(type_check_function)
>                 test_nodes.append(...)
>
> Basically, it executes each type check function only once, but regardless
> of the type it is testing against. Works well for builtin types, doesn't
> work for extension types.
>
> https://github.com/cython/cython/commit/c14533e4a00e789df8d800fa9f4cc099faabb67e
>
> Hmm, I'm not sure how to merge commits over git branches with hg-git...

I've cherry-picked it in.

- Robert
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to