Design by Contract for Python
A. Lloyd Flanagan
alloydflanagan at attbi.com
Wed May 14 15:33:22 EDT 2003
Terence Way <terry at wayforward.net> wrote in message news:<mailman.1052896821.2209.python-list at python.org>...
> I'm interested in adding pre-conditions, post-conditions, invariant
> assertions into Python code... just like in Eiffel.
>
> I'm putting together an implementation, more details here:
> http://www.wayforward.net/pydbc/
>
> I'm wondering if there's any other implementations out there... I know
> of three:
>
> 1. Design By Contract for Python by R. Plosch
> Nice PDF, good paper, no implementation, uses __getattr__ hacking
> 2. PyDBC by Daniel Arbuckle
> An implementation based on __metaclass__. Must be coded as
> separate functions.
> 3. Examples used by Guido van Rossum to describe attribute descriptors.
>
> Are there any others?
>
> Do any support the full features of Eiffel-style assertions: support of
> old values, support for inheritance, inclusion in documentation, no
> overhead when assertions are disabled?
>
I don't know, but once you implement it, I'd love to see it.
More information about the Python-list
mailing list