Why not compare your needs to something that exists in the standard pythonPython library, and then see how that is implemented?
Note, if you don't need an object, you can still define functions within functions. With python3Python 3 there is the new nonlocal
declaration to allow you to change variables in your parent function.
You might still find it useful to have some simple private classes inside your function to implement implement abstractions and tidying up operations.