classobj() question

Roland Hedberg roland.hedberg at adm.umu.se
Tue Feb 12 16:09:21 CET 2008


Hi!

I'm in the position that I have a bunch of classes defined before hand
and then in some special circumstances I need to dynamically create a
class that has a number of the static classes as parents.

So I thought I could use classobj() from the new module, it seem exactly
what I wanted.

But, it doesn't perform as I expected.

I've made an extremely simple program to try to show what I mean and
what I expected. It's attached to this mail.

So, how should I have done it ?

-- Roland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: classtest.py
Type: text/x-python
Size: 1220 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20080212/640fb946/attachment.py>


More information about the Python-list mailing list