On 28.03.2007, at 20:19, Simon Burton wrote: > On Wed, 28 Mar 2007 19:54:35 +0200 > Christian Tismer <[EMAIL PROTECTED]> wrote: > >> >> This looks good, congrats! >> >> I had a different approach in mind which >> would work without explicitly adding a pass to the >> annotator, no idea which idea is more practical. >> >> What I wanted to do is a tiny patch to flow space >> that allows to add little plugins for extension. >> My plugin would intercept things like str(...) >> during flowing, and rewrite accordingly. This is quite >> similar to what you did, but does things earlier. > > Yes, this is what Richard suggested also, but don't we > need the annotation ? Otherwise we don't know when to intercept str > (...).
Yes you are right. Well maybe not so right. Is there any object that has no __str__ method? If yes, then this is an RPython syntax error. I thing we *always* can call the object's __str__ method if it is RPython code. What needs to be added is a handler routine. It must be registered as a function that specializes on the type of its argument. This way it will be the right __str__ call for every type. ciao -- chris _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
