Pre/Postconditions with decorators
stephen.thorne at gmail.com
Sun Jan 9 00:46:35 CET 2005
On Fri, 7 Jan 2005 20:01:50 +0200, George Sakkis <gsakkis at rutgers.edu> 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 http://rafb.net/paste/results/voZYTG78.html and its unit test on
> http://rafb.net/paste/results/MYxMQW95.html. Any feedback will be appreciated.
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
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