Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19500

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

References <CAOFbRm+sJF=+hqkgHSzZ1WmEU6+SNPp5LcaY3xfZ_OFVioTkbQ@mail.gmail.com>
From Devin Jeanpierre <jeanpierreda@gmail.com>
Date 2012-01-26 14:51 -0500
Subject Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks
Newsgroups comp.lang.python
Message-ID <mailman.5135.1327607533.27778.python-list@python.org> (permalink)

Show all headers | View raw


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@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-01-26 14:51 -0500

csiph-web