[pypy-dev] Re: Object model
Armin Rigo
arigo at tunes.org
Fri Feb 14 18:05:27 CET 2003
Hello Michael,
On Thu, Feb 13, 2003 at 04:51:32PM +0000, Michael Hudson wrote:
> > class BorrowingObjectSpace(ObjectSpace):
> > ....
> > def add(self, x, y):
> > return x+y
>
> "from operator import *" could go here?
Almost. There is that extra 'self' argument. Also, I didn't tell you the
whole truth: I still think we must catch exceptions at that point. So it
would be more like that:
def add(self, x, y):
try:
return x+y
except:
self.handle_python_exception()
Armin
More information about the Pypy-dev
mailing list