On Thu, Aug 27, 2015 at 10:59 PM, Steven D'Aprano <st...@pearwood.info> wrote:
> On Thu, 27 Aug 2015 09:14 am, Chris Angelico wrote:
>
>> On Thu, Aug 27, 2015 at 9:12 AM, Chris Angelico <ros...@gmail.com> wrote:
>>> Or is there a magic __isinstance__
>>
>> Argh, keyed the wrong thing and sent the post prematurely. Meant to say:
>>
>> Or is there a magic __instancecheck__ method somewhere that I'm not aware
>> of?
>
> Yes -- see Terry Reedy's post.
>
> isinstance(inst, klass) ends up calling
>
> type(klass).__instancecheck__(klass, inst)

I'm aware that it _can_ exist, but I was asking if one _did_ exist.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to