mechanics to specify an interface

Uwe Mayer merkosh at
Sat Mar 6 11:20:04 CET 2004


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

More information about the Python-list mailing list