Russ a écrit : (snip) > I don't see how you can avoid adding some new syntax, given that > Python does not > currently have syntax for specifying invariants and pre- and post- > conditions.
class Parrot(object): @pre(lambda x : x != 42) @post(lambda result: result != 42) @invariant(lambda self: self.x == 42) def reliable_method(self, x): # your code here return something -- http://mail.python.org/mailman/listinfo/python-list