From: Barry S. <ba...@ba...> - 2010-04-13 19:28:20
|
On 13 Apr 2010, at 00:29, Fernando Libonati wrote: > But derivarion works fine with old Style classes. No it does not. You just have not encounter a problem yet. But I expect you will. I must admit it never occurred to me derive the way you are trying to do. Python's needs do not allow this to work. If you read the template code for PythonClass and PythonExtension you will see that both create a lot of static methods and data structures. You cannot just derive in C++ and expect the Python glue to work, except by accident. > > Today i was thinking in make the whole class hierarchy with old style > ones and restrict new style to some particular aspects of the > simulator (e.g. a system container that doesn't derive from Block) As I said you need to organise your class's so that you turn the leafs into Python objects. Are you deriving for code reuse or relationships? Barry |