Maintainable, distributable, testable python code

September 5, 2007

main pythonSome suggestions to write a main() function :

Boilerplate for maintainable, distributable, testable python code by Matt Harrison http://panela.blog-city.com/boilerplate_for_maintainable_distributible_testable_python.htm

Another Python main() functions by Guido van Rossum
http://www.artima.com/weblogs/viewpost.jsp?thread=4829

Advertisements

Python 3000 project (Py3k or Python 3.0)

March 22, 2007

In addition to syntax changes, Python 3000 (around 2008) has plenty of new features. This video is a preview of a keynote to be given at PyCon 2007 but a lot of changes are presented.

Example: In Python 3000, print is no longer a statement, but a function. So:

print: print “this is a test”

becomes: print(“this is a test”)

I have a suggestion: UnitTest for all our modules, now!

A good test suite will save you from a huge headache when all of these changes come down.