Protocols for Python?

Harold Fellermann dadapapa at googlemail.com
Thu Apr 27 16:28:53 EDT 2006


redefined.horizons at gmail.com wrote:
> Still, I'm designing an application that I want to be extendable by
> third-party developers. I'd like to have some sort of documentation
> about what behavior is required by the components that can be added to
> extend the application. I'd thought I might try documenting these
> behaviors as "protocols" instead of creating abstract classes with no
> method implementations.

Use doc strings :-) They are easy to learn, easy to understand (once
you
learned how to write meaningful ones, that is), integrated into the
core
language and supported by IDEs and editors.
Combine a good documentation with proper exception handling and
extending your application will be easy. Bateries inluded, you know.




More information about the Python-list mailing list