Donnerstag, 26. April 2007

Python design by contract

Today I've implemented some decorators for Eiffel-like design py contract.
It's very nice to use I think:

@require('s1 != 0')
def inv(s1): return 1/s1

or
@require('x != 0')
@enshure('result > 0')
def quad(x): return x*x*x / x


For more information just ask me. I'll put the code somewhere, soon.

- stanz

1 Kommentar:

Unknown hat gesagt…

Casino in Las Vegas: Guide & Info on the Best Casinos in
Find casinosites.one a septcasino Casino in Las Vegas and play games like blackjack, roulette, https://febcasino.com/review/merit-casino/ craps 1xbet korean and more! We've got septcasino the complete gaming experience, exclusive restaurants,