[Tutor] A few more notes on Python interfaces

Alan Gauld alan.gauld at freenet.co.uk
Fri Jun 23 22:42:54 CEST 2006


> more about it.  Needless to say, my notes benefited much from the
> comments on this list.  You can find these notes here:
> 
>    http://www.rexx.com/~dkuhlman/python_comments.html#interfaces
> 
> I'll welcome any comments.

Nice work.

One wee point is that the term prorocol is an OOP community term 
rather than a Python community. Interfaces are a way to enforce 
protocols in certain languages (usually but not always statically 
typed, eg both Java(statically typed)  and Visual Basic (dynamically 
typed - sort of) both support interfaces).

The term protocol has been widely used in OOP since the 1970's 
and is commonly found in the literature of Smalltallk, Lisp and 
Objective C. The latter has language constructs that explicitly 
support protocols, as well as interfaces. (This leads to some 
subtle capabilities of ObjectiveC which are mainly of interest 
to academics! :-)

Regards,

Alan G.






More information about the Tutor mailing list