[pypy-dev] Re: Base Object library (was: stdobjspace status)
stephan.diehl at gmx.net
Thu Feb 27 17:23:44 CET 2003
On Thursday 27 February 2003 16:53, you wrote:
> Hello Stephan, hello Laura,
> Thanks Laura for pointing out the potential language problems.
Is there a possibility that Lauras mail didn't end up on the list? I couldn't
> Your point of view on Compliant Object Spaces is very helpful. It seems to
> show that we will want different object spaces that share quite a lot of
> source files, e.g. two object spaces which are the same except for their
> list implementation. Moreover, some of these implementations might be
> easier to translate into efficient C code and some others might be better
> suited for translation to some other language.
> What we may thus need is a way to define several object spaces from the
> same set of files. The std/ directory would then contain all files that
> implement a bit of the "compliant" behavior for some specific kind of
> objects; it could contain e.g. both the standard and Stephan's decimal
> implementation of floats. What is left to be determined is thus how the
> objects are instantiated, as Stephan pointed out. This currently takes
> place in the class ObjSpace, in the methods wrap(), newlist(), newtuple(),
> newdict(), etc. Then what we will need at some point is to have several
> different subclasses of baseobjspace.ObjSpace in several files, possibly
> all inside std/, which import and instanciate different W_XxxObject
> classes. To make an object space which is the same as another one expect
> for its implementation of floats, just override its wrap() method.
This basicly sounds like what I had in mind (but couldn't express very well
About object instantiation:
Where excatly is the textual representation of a python object turned into an
object? Is it done by the parser? (for example "12345L" --> 12345L)
> Sounds cool!
> A bientôt,
> pypy-dev at codespeak.net
More information about the Pypy-dev