This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients gvanrossum
Date 2007-11-13.18:25:43
SpamBayes Score 0.008876998
Marked as misclassified No
Message-id <1194978343.94.0.00370847654869.issue1438@psf.upfronthosting.co.za>
In-reply-to
Content
[Guido]
> > I've noticed that abc.py's __instancecheck__ gets called a lot
> > at times when I don't expect it.  Can you research this a bit?

[Amaury]
> In classobject.c, method_call() calls PyObject_IsInstance() on the
> first arg when the method is unbound.
> This happens a lot in io.py, each time the code calls a base class
> method.

[Guido]
I wonder if we should get rid of this isinstance check. It is only used
to be able to issue a pedantic error message. Perhaps we could even get
rid of unbound methods, and just return the underlying function object
instead of creating an unbound method object. This should make things a
bit faster.
History
Date User Action Args
2007-11-13 18:25:44gvanrossumsetspambayes_score: 0.008877 -> 0.008876998
recipients: + gvanrossum
2007-11-13 18:25:43gvanrossumsetspambayes_score: 0.008877 -> 0.008877
messageid: <1194978343.94.0.00370847654869.issue1438@psf.upfronthosting.co.za>
2007-11-13 18:25:43gvanrossumlinkissue1438 messages
2007-11-13 18:25:43gvanrossumcreate