Pre/Postconditions with decorators

Stephen Thorne stephen.thorne at
Sat Jan 8 18:46:35 EST 2005

On Fri, 7 Jan 2005 20:01:50 +0200, George Sakkis <gsakkis at> wrote:
> > Hi George,
> > it would be nice to see how you have tackled
> > the task.
> > Maybe we will have a checker
> > module in Python one day... ;-)
> I posted my module on and its unit test on
> Any feedback will be appreciated.

Okay, nice.

Unresolved Problems:
1) How do you handle duck types, i.e. a method that accepts StringIO,
cStringIO or any other object that has a .readlines(), .seek() and
.read() method?
2) How do you turn off the type checking for production code?

Otherwise I quite like it. Please publish it somewhere.


More information about the Python-list mailing list