ANN: Design By Contract for Python 1.0 beta 2 
Author Message
 ANN: Design By Contract for Python 1.0 beta 2

Announcing Design By Contract for python 1.0 beta 2
(Changes since last announcement at end of this email)

Design by Contract is familiar to anyone who has spent time with the
Eiffel programming language.  This implementation is a cross between
full Eiffel-style contracts and the doctest module.

Contracts are high-level assertions that are part of the program's
documentation.  Modules and classes have invariants, expressions that
must be true at the start and end of every public function or method
call.  Methods and functions have pre-conditions, expressions that must
be true on entry; and post-conditions, expressions that must be true
on exit.

      http://www.*-*-*.com/

This version supports the full contract feature set:
   * pre: expressions in function and method docstrings;
   * post: expressions in function and method docstrings;
   * inv: expressions in class and module docstrings;
   * post: expressions can access __old__ values and the __return__
     value;
   * pre: expressions are weakened by derived methods; and
   * post: and inv: expressions are tightened by derived classes.

Version 1.0 beta 2  - 06 June 2003
   * Use separate exception classes eg PreconditionViolationError
     instead of AssertionError
   * Correctly weaken pre-conditions: they are not ORed; instead, if
     a method fails its precondition and an overridden method's pre-
     conditions are still valid, raise an InvalidPreconditionError.
   * Support Re-Structured Text (ReST) by allowing :: after pre, post,
     inv keywords
   * Invariants aren't checked after constructor throws exception
   * Only scan for code objects actually defined in specified module,
     not just all objects in module namespace
   * Save docstring line numbers, useful when raising exceptions to tell
     where in the code the exception actually came from.

<P><A HREF=" http://www.*-*-*.com/ ;>Contract 1.0
beta2</A> -
Design By Contract for Python.  (06-Jun-03)



Wed, 23 Nov 2005 04:03:44 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ANN: Design By Contract for Python 1.0 beta 1

2. ANN: Design By Contract for Python 1.0 beta 2

3. ANN: Design By Contract for Python 1.0 beta 1

4. ANN.: Beta 1.0 of Weak Reference Extension Module is now available

5. ANN: WorldBuilder beta rollout at 3D Design Show

6. JPython 1.0 beta 1 release (Python for Java)

7. ANN: discord 1.0 -- Python conversion of dates to Discordian

8. ANN: PyQStat 1.0 -- A Python wrapper around QStat

9. ANN: Python Benchmark Suite -- pybench 1.0

10. ANN: fauxident 1.0 -- faux identd in Python

11. ANN: empy 1.0 -- Embed Python in template text as markup

12. ANN: cage 1.0 -- Cellular automata engine in Python

 

 
Powered by phpBB® Forum Software