Issue1638982
Created on 2007-01-18.21:19:20 by leouserz, last changed 2007-01-19.16:42:53 by leouserz.
msg2628 (view) |
Author: Deleted User leouserz (leouserz) |
Date: 2007-01-18.21:19:20 |
|
see:
http://sourceforge.net/tracker/index.php?func=detail&aid=1638882&group_id=12867&atid=112867
patch types.py so that BuiltinFunctionType and BuiltinMethodType are the same type.
patch PyBuiltinMethods so that it has the same type as the above. This should help somewhat as I believe each subclass was gettin its own type. Save a little memory, maybe a little time.
patch PyReflectedFunction so that it like above uses the above type. If there are situations where this one needs to have different types, it will need to be enhanced further so that it can have a variable type. The motivator here was so that builtins like type(dir) would report itself as a builtin type.
attached are the patches and an enhanced patch.
leouser
|
msg2629 (view) |
Author: Deleted User leouserz (leouserz) |
Date: 2007-01-18.21:20:01 |
|
File Added: PyBuiltinFunctionDiff.txt
|
msg2630 (view) |
Author: Deleted User leouserz (leouserz) |
Date: 2007-01-18.21:20:37 |
|
File Added: PyReflectedFunctionDiff.txt
|
msg2631 (view) |
Author: Deleted User leouserz (leouserz) |
Date: 2007-01-18.21:20:59 |
|
File Added: testbuiltins.py
|
msg2632 (view) |
Author: Samuele Pedroni (pedronis) |
Date: 2007-01-19.16:11:25 |
|
I don't think that making PyReflectedFunction apparent type the same as builtin function is a good idea, I have seen code
using the extra feature that were exposed through it. Subtyping may be a solution but long term PyReflectedFunction should not be the way to expose purely python stuff.
Also using super(.) this way is not the correct way to attach types, because it doesn't influence the mapping of the class itself to a type leading to inconsistencies.
|
msg2633 (view) |
Author: Deleted User leouserz (leouserz) |
Date: 2007-01-19.16:42:53 |
|
well, what would be helpful is to have some test code so I can see where things go wrong.
leouser
|
|
Date |
User |
Action |
Args |
2007-01-18 21:19:20 | leouserz | create | |
|