[C++-sig] Translating "type()"
Joseph Lisee
jlisee at gmail.com
Fri Sep 29 23:54:10 CEST 2006
I have a line of python code that generates a new class:
class_name = "NewClass"
NewClass = type(class_name, (object,), {})
I have tried to replicate this in Boost.Python with this:
object NewClass = class_<object>(class_name);
This give warnings about registering a to-python convert more than once.
What is the proper way to do this, ie: Generate a new class with the given
name.
-Joe
More information about the Cplusplus-sig
mailing list