[pypy-svn] r5601 - pypy/trunk/src/pypy/objspace/std
mwh at codespeak.net
mwh at codespeak.net
Wed Jul 21 13:11:07 CEST 2004
Author: mwh
Date: Wed Jul 21 13:11:07 2004
New Revision: 5601
Modified:
pypy/trunk/src/pypy/objspace/std/objspace.py
Log:
wrap complexs (review welcome!)
Modified: pypy/trunk/src/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/std/objspace.py Wed Jul 21 13:11:07 2004
@@ -233,6 +233,12 @@
return W_ListObject(self, wrappeditems)
if isinstance(x, long):
return W_LongObject(self, x)
+ if isinstance(x, complex):
+ # XXX is this right?
+ c = self.getitem(self.w_builtins, self.wrap("complex"))
+ return self.call_function(c,
+ self.wrap(x.real),
+ self.wrap(x.imag))
if isinstance(x, BaseWrappable):
w_result = x.__spacebind__(self)
#print 'wrapping', x, '->', w_result
More information about the Pypy-commit
mailing list