I encountered this piece of python code (pasted below) on effbot and I was wondering:
Why defining a function within a function?
import
To keep it isolated. It's only used in this one place. Why define it more globally when it's used locally?