Ideal way to separate GUI and logic?
asimjalis at gmail.com
Tue Jul 16 03:02:03 CEST 2013
On Mon, Jul 15, 2013 at 5:25 PM, <fronagzen at gmail.com> wrote:
> Again, thanks for all the responses. I'm curious, though, what exactly is
> the rationale for making functions so small? (I've heard that the function
> calling of Python has relatively high overhead?)
There is a small overhead, but it makes the code easier to read and
understand. You can look at the function name and get and idea of _what_
the function is doing instead of having to figure out _how_ it is doing it.
Regarding optimization, after you have written your application if you see
performance issues you can surgically optimize the spots that have the
issues and leave most of the code untouched.
To quote Don Knuth, "premature optimization is the root of all evil". Also
the article at http://en.wikipedia.org/wiki/Program_optimization makes some
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list