shadown / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Simplify the root object #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the root object uses the builtin _clo() to create the root class 
object.

Check to see if this can be changed to the code "class object(): pass".  The 
first error that pops up is that the code above tried to do a LOAD_NAME of 
"__name__" and when it is not found in the module, it searches PM_BUILTINS 
which is still null at this point in execution.

So, if modules are given their __name__ attribute, the lookup won't fail and 
the code might work.  But you should also check that doing it this way is 
smaller or faster.  Don't give all modules __name__ attrs just for this (it 
would be a waste of memory since a reasonable workaround is already in 
place).

Original issue reported on code.google.com by dwhall...@gmail.com on 29 Apr 2009 at 3:07

GoogleCodeExporter commented 9 years ago
issue #37 was a duplicate.  All the work and check-in was done for #37.

Original comment by dwhall...@gmail.com on 21 May 2009 at 3:04