[melbourne-pug] Code review comments for next issue of The Python Papers
Ryan Kelly
ryan at rfk.id.au
Fri Jun 8 14:54:54 CEST 2007
> 4) isinstance(node,
> str) -- indeed, what about unicode? In Python 2.5, is a unicode string a
> str? I'll have to research this to make sure.
From memory, the 'proper' way to do this is to compare with basestring,
although everytime I use it I cringe slightly because it just doesn't
read right:
isinstance(node,basestring)
> 5) Testing. I'm not familiar with unit testing frameworks. The best
> thing would probably be to identify some kind of preferred testing
> framework and write a better set of formal tests. Any suggestions?
I've had good experiences with the built-in unittest module,
particularly using it via setuptools `python setup.py test` command.
I've got simple needs but it's saved by bacon a few times :-)
Cheers,
Ryan
More information about the melbourne-pug
mailing list