Hi Laurens

>>>>> "Laurens" == Laurens Van Houtven <[email protected]> writes:
Laurens> I've noticed that the classes generated by py:twisted aren't
Laurens> new-style.

Use

  thrift --gen py:twisted,new_style

to get new-style classes. I've been meaning to file a ticket for an
addition to the class specification, I guess via something like

    struct myclass {
        1:i32 xxx,
    } (python.superclass = "otherclass")

that would allow one to specify the parent class. Then you could call
__init__ in super, and perhaps not generate a __repr__ (to allow the parent
to determine how instances should be printed), and maybe other things.

Terry

Reply via email to