D
David Pratt
Hi list. I use 'type' to generate classes but have a need to order
the attributes for the generated class. Of course a dict is not going
to maintain ordering. Is there any way to dynamically generate a
class with attributes in specific order?
my_new_class = type( 'MyNewClass', tuple_of_bases, dict_of_attributes)
Many thanks,
David
the attributes for the generated class. Of course a dict is not going
to maintain ordering. Is there any way to dynamically generate a
class with attributes in specific order?
my_new_class = type( 'MyNewClass', tuple_of_bases, dict_of_attributes)
Many thanks,
David