Why not compare your needs to something that exists in the standard python library, then see how that is implemented? 

Note, if you don't need an object, you can still define functions within functions. With python3 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 abstractions and tidying up operations.