Protocols for Python?

redefined.horizons at gmail.com redefined.horizons at gmail.com
Thu Apr 27 15:26:28 EDT 2006


I think I have reached an important moment in my growth as a Python
Developer. I realize now why interfaces aren't really necessary in
Python. :]

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.

I stumbled across PyProtocols, but I don't think it is what I am
looking for. I don't want to "implement" a form of interfaces in the
python language, just document the required behavior for certain
objects in my application for other developers.

Is there a standard way to document protocols in Python? Of should I
come up with something tailored to my needs.

Thanks,

Scott Huey




More information about the Python-list mailing list