On Saturday, 8 February 2020 01:50:04 CET Go Luhng wrote: > I am creating a child class > `Child(twisted.internet.protocol.DatagramProtocol)` to implement a > custom UDP multicast protocol. > > I need to add an `__init__()` to `Child`, but as part of that I need > to call `super()` which is impossible because `DatagramProtocol` is > old-style. > > How should I proceed?
There is no __init__() in DatagramProtocol or in its superclass AbstractDatagramProtocol, so you can just skip the call. > Also, why are there old-style classes in the latest release of > Twisted? I don't know the reason, but it seems to be deliberate, since AbstractDatagramProtocol is annotated with @_oldStyle in the source. Bye, Maarten _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python