Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

Devin Jeanpierre jeanpierreda at gmail.com
Thu Jan 26 14:51:30 EST 2012


Ooh, runtime turing-complete dependent-types. :)

I'm not sure if you're aware of the literature on this sort of thing.
It's nice reading. A library such as this that's designed for it could
be used for static checks as well.

Probably deserves a better name than "constraintslib", that makes one
think of constraint satisfaction.

On Thu, Jan 26, 2012 at 2:36 PM, Nathan Rice
<nathan.alexander.rice at gmail.com> wrote:
> Design by contract style preconditions, postconditions and invariants are also
> supported, and can be used either as context managers or function decorators::

Any way to get them to raise a different error, such as ValueError (in
particular for preconditions)?

-- Devin



More information about the Python-list mailing list