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.r...@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 -- http://mail.python.org/mailman/listinfo/python-list