[python-gtk] problem with multiple inheritance

Taki Jeden bartekgorny at interia.pl
Fri Jun 3 04:56:48 EDT 2005


Greg Ewing wrote:

> Taki Jeden wrote:
> 
>> class view_tree_model(gtk.GenericTreeModel,gtk.TreeSortable):
>> 
>> raises a "TypeError: multiple bases have instance lay-out conflict"
>> Is this a bug in gtk, or python-gtk, or something?
> 
> It's not a bug, it's a limitation of the way Python
> handles inheritance from built-in types. You can only
> inherit from more than one built-in type if they have
> compatible C structures, and it appears that the two
> you're trying to inherit from aren't compatible.
> 
> You'll have to think of some way of doing whatever
> you're trying to do without inheriting from multiple
> gtk types.
> 

Ok, but the code isn't mine - it is tinyERP (tinyerp.org). And people are
running it, that's why I assume the problem is not in the code.

BG

-- 
Zamiast sensownej sygnatury...:
| http://www.safetycam.pl | http://www.bpcc.org.pl/en,0,0.html |
http://www.spoko.neostrada.pl | http://www.gorny.najlepsze.pl/imiona



More information about the Python-list mailing list