mechanics to specify an interface

Uwe Mayer merkosh at hadiko.de
Sat Mar 6 05:20:04 EST 2004


Hi,

in my program I want to "specify" that some object implements i.e. the
dictionary or list interface.
What is the Python way to do that?

i.e. in Java I'd include an interface.
in Python I could write an abstract class and inherit from it (probably
needs multiple inheritance), or I could just specify that in a comment. 

What'd you suggest?
Thanks in advance
Uwe




More information about the Python-list mailing list