Using debug print routine inside assert

Edvard Majakari edvard+news at majakari.net
Tue Nov 4 14:59:57 EST 2003


"Richard Brodie" <R.Brodie at rl.ac.uk> writes:

> I'm not sure how often you would need to write:
>
> debug("subfrobnicate(%s, %s) returned %s" %(p1, p2, subfrobnicate(p1,
> p2)))

Of course you're right here - my example was pretty synthetic.

> Also note that Python now has a standard logging module since 2.3:
> http://www.python.org/doc/2.3/whatsnew/

That listing seemed quite impressive. Thanks!

-- 
# Edvard Majakari		Software Engineer
# PGP PUBLIC KEY available    	Soli Deo Gloria!

$_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";




More information about the Python-list mailing list