Message3411

Author leosoto
Recipients leosoto, pjenvey
Date 2008-08-10.07:12:08
SpamBayes Score 1.3717839e-06
Marked as misclassified No
Message-id <1218352329.84.0.819095870143.issue1060@psf.upfronthosting.co.za>
In-reply-to
Content
I'm working on it. The biggest problem introduced by my patch is with
types that already expose __coerce__, such as PyInteger.

There, when the new PyIntegerDerived#__coerce_ex__ looks up for 
'__coerce__' it finds the method exposed by PyInteger. This exposed
method (PyObject#int__coerce__) calls PyObject#__coerce__ which calls
the overriden __coerce_ex__ and we have an infinite loop.

[BTW, I'm reaching the point where I realized that no exposed method
should call virtual methods, either directly or indirectly. Otherwise
this kind of unintended interactions happen.]

I plan to refactor PyObject#__coerce__ slightly, so
PyInteger#int__coerce__ (and other exposed coerce methods) don't need to
call (indirectly) the virtual PyObject#__coerce_ex__ method.
History
Date User Action Args
2008-08-10 07:12:09leosotosetmessageid: <1218352329.84.0.819095870143.issue1060@psf.upfronthosting.co.za>
2008-08-10 07:12:09leosotosetrecipients: + leosoto, pjenvey
2008-08-10 07:12:09leosotolinkissue1060 messages
2008-08-10 07:12:09leosotocreate