Skip to main content
Copy edited (ref. <http://en.wikipedia.org/wiki/Python_%28programming_language%29>).
Source Link

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.

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.

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

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

Source Link
meuh
  • 151
  • 1
  • 5

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.