Re: is there a functional assert(x==y, 'error msg')

2010-05-07 Thread Vincent Davis
On Fri, May 7, 2010 at 8:38 PM, James Mills wrote: > On Sat, May 8, 2010 at 12:04 PM, Vincent Davis > wrote: > >> Is there a functional assert(x==y, 'error msg') ? >> I can only find the assert that is used like; >> assert x==y, 'error msg' >> > > What about: > > def assertfunc(expr, msg): >a

Re: is there a functional assert(x==y, 'error msg')

2010-05-07 Thread James Mills
On Sat, May 8, 2010 at 12:04 PM, Vincent Davis wrote: > Is there a functional assert(x==y, 'error msg') ? > I can only find the assert that is used like; > assert x==y, 'error msg' > What about: def assertfunc(expr, msg): assert expr, msg cheers James -- http://mail.python.org/mailman/listi