[pypy-dev] Summary

Armin Rigo arigo at tunes.org
Thu Jun 24 21:47:27 CEST 2004


Hello !

Here is at least a quick overview of the sprint changes...

* Holger already talked about the big change, which was to use CPython's
descriptor model as the object model.  Now all classes, built-in or not, have
a bunch of __xxx__ methods and properties, and the operations themselves (e.g.
space.add()) are no longer multimethods but calls to these special methods,
using CPython's rules, which you can see in objspace/descroperation.py.  For
example, space.add(w1,w2) works by looking up __add__ on the type of w1 and
then __radd__ on the type of w2.  This means that there isn't a lot of
difference any more between built-in and user-defined classes, which is good.  
Note that multimethods are still used to populate the built-in classes, e.g.  
int.__add__() is created as a function object that dispatches to one of the
add__Int_Xxx() functions.
So basically every complex meta-class magic works just fine in PyPy now :-)
Credits in alphabetical order: Holger, me, Michael, Samuele.

* Samuele and Alex (and Holger on tests) implemented the package import
system.

* On the translator side, Anders and myself worked on code generation: it can
produce things like classes with methods on them.  Then Anders cleaned it up a
lot and refactored the corresponding files and tests.  Holger helped here too.

* Anna worked on documentation.

* We considered the unittest-to-utest switch a couple of time.  utest seems
ready now.  At the end of the second week Laura and Jacob started working on
an automatic translation tool for all our test_*.py files.  Laura seems to 
have almost finished it by now.

* Michael and Holger have put an (optional) HTTP server in PyPy, to handle
these long tracebacks in a browser.  I think it is still waiting for
improvement.

* A lot of small things went fixed all along the sprint, notaby by trying to 
run PyPy on top of itself.

* Holger moved 'class complex' into __builtin__module.py.

* Alex, Holger, Michael: String formatting ( % ) is done by PyPy now; I think
it's not entierely complete yet.

* Laura worked a bit more on her tool to figure out what exactly is missing
but present in CPython.

* We now have real CPython-ish hash-tables as dictionaries.  Thanks Michael.

* A nice feature (XXX mention it somewhere) is that on the PyPy prompt, Ctrl-C
sends you to a CPython prompt in which you can play with PyPy at interp-level.  
All app-level names 'x' are available under 'w_x' names, i.e. the same name
with a 'w_' prefix, and of course there is a 'space'.

* Holger, Michael: operator module in pure Python.  [However, Michael, let me
point out that 'operator.add(2,3)' fails currently -- all of them do.  
staticmethods are not callable.]


Sorry if I missed something above the "detail" level, or someone's due
credits.  This list was built by scanning through the svn checkin messages.


A bientôt,

Armin.



More information about the Pypy-dev mailing list