Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
status of Programming by Contract (PEP 316)?
- From: uymqlp502 at sneakemail.com (Russ)
- Subject: status of Programming by Contract (PEP 316)?
- Date: Thu, 30 Aug 2007 17:34:14 -0700
> > That looks like new syntax to me. > > It's the syntax for decorator functions, and it's not that new - it > cames with Python 2.4, released November 30, 2004. After looking more carefully at your example, I don't think it is as clean and logical as the PEP 316 syntax. At first I thought that your pre and post-conditions applied to the class, but now I realize that they apply to the function. I prefer to see the conditions inside the function in the doc string. That just seems more logical to me. With all due respect, your proposal is interesting, but I think it overextends the "function decorator" idea a bit. A nit-pick I might have with the PEP 316 syntax is that I think "invariant" should be spelled out rather than abbreviated as "inv". The same might apply to "pre- condition" and "post-condition". But that's obviously no big deal.
- Follow-Ups:
- status of Programming by Contract (PEP 316)?
- From: Bruno Desthuilliers
- status of Programming by Contract (PEP 316)?
- References:
- status of Programming by Contract (PEP 316)?
- From: Russ
- status of Programming by Contract (PEP 316)?
- From: Steven Bethard
- status of Programming by Contract (PEP 316)?
- From: Russ
- status of Programming by Contract (PEP 316)?
- From: Michele Simionato
- status of Programming by Contract (PEP 316)?
- From: Russ
- status of Programming by Contract (PEP 316)?
- From: Chris Mellon
- status of Programming by Contract (PEP 316)?
- From: Russ
- status of Programming by Contract (PEP 316)?
- From: Russ
- status of Programming by Contract (PEP 316)?
- From: Bruno Desthuilliers
- status of Programming by Contract (PEP 316)?
- From: Russ
- status of Programming by Contract (PEP 316)?
- From: Bruno Desthuilliers
- status of Programming by Contract (PEP 316)?
- Prev by Date: status of Programming by Contract (PEP 316)?
- Next by Date: reload(sys)
- Previous by thread: status of Programming by Contract (PEP 316)?
- Next by thread: status of Programming by Contract (PEP 316)?
- Index(es):