Meta-class inheritance problem (Python2.0 bug?)
Lorien Dunn
loriendNOSPAM at bigpond.com
Fri Mar 16 21:29:50 EST 2001
Hullo all,
I've been using boost::python for a little while now- long enough to have
seemingly successfully wrapped my extension, and I've run into a bug in
python 2.0. The real code that the following pseudo code represents throws
a TypeError.
class MyDerivedClass(MyPurePythonClass, MyBoostClass):
def __init__(self):
MyPurePythonClass.__init__(self)
MyBoostClass.__init__(self)
The problem occurs in MyPurePythonClass- Python says "unbound method must
be called with class instance 1st argument". This makes sense: I'm passing
a meta-class instead of a class. David Abrahams (the main author of
boost::python) agrees that this is a Python problem, and that it should
affect Zope as well.
He also said that it should be an easy modification, but he doesn't know
what ramifications it would have throughout the rest of the python
interpreter.
Advice anyone?
Thanks,
Lorien Dunn
More information about the Python-list
mailing list