[pypy-dev] translating classes to javascript

John Smith johnsmithjohnxxx at yahoo.com
Sat Feb 17 22:23:02 CET 2007

Hi list,

I'm fairly new to pypy and was only doing some experimenting with the javascript translator so far. First of all let me say that the whole project is pretty amazing!

After translating a couple of functions I tried translating a class, but was unsuccessful so far but since the docs mention supporting inheritance I guess this should be possible. Is it?

For instance if I have in RPython the following:

class test:
    def __init__( self, value ):
        self.value = value
    def meth1( self ):
        return self.value
    def meth2( self ):
        do_something_which_is_translatable( )

then how do I get the corresponding javascript code? Since the docs say jscompile should be invoked by 'jscompile module function_names' I'm kind of lost. The same holds for rpython2javascript it expects a list of functions.

Any insight or comment would be very helpful.
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20070217/031097b6/attachment.html>

More information about the Pypy-dev mailing list