[pypy-dev] module SomeObject setattr.

Toon Verwaest verwaest at iam.unibe.ch
Mon Mar 10 00:53:26 CET 2008


I'm not yet fully comfortable with the PyPy code so I just lay it out here:

I have written the following code in the Squeak VM (should change in 
the future but its just to show the "problem"):

<file objtable.py:>
objects = []

<file shadow.py:>
objtable.objects += [objofspecifictype]

This seems not to be translatable since this is translated to:
vX = setattr(objtable-module, 'objects', vY).

generally setattr are done on SomeInstance which nicely returns None -> 
SomeImpossibleValue -> the annotator is happy.
However, modules appear to be instances of SomeObject on which setattr 
returns a SomeObject -> type of vX gets broken.

(and the bug received is not very obvious since it says that the 
original type was (none)...)


This message was sent using IMP, the Internet Messaging Program.

More information about the Pypy-dev mailing list