I'm still struggling to learn all the rules of RPython, i have read the coding 
guide, and the PDF's PyGirl and Ancona's RPython paper, but still i feel i'm 
not fully grasping everything.

I have a function that returns different classes that all share a common base 
class.  It works until i introduce a new subclass that has some methods of the 
same name.  Then i get the demotion, can not follow, degenerated error.

I googled, but all i can find is an IRC log where Fijal seems to taking talking 
about my problem.
http://www.tismer.com/pypy/irc-logs/pypy/%23pypy.log.20070125

<fijal> pedronis: if function can return (in rpython) set of classes with 
common superclass, than all methods that I call later must be defined on that 
superclass, right?

[11:30] <fijal> [15:01] <pedronis> yes, unless you assert a specific subclass 

So i just need to use an assert statement before the function return, and 
assert the class i am returning?

I am blogging about my progress while learning RPython, i have posted about 
meta-programming in Rpython which is a new concept to me.

http://pyppet.blogspot.com/2010/08/meta-programming-in-rpython.html

-brett



_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to