Chris Withers <ch...@simplistix.co.uk> wrote:

> Now, if I want to do *exactly* the same thing with a variable named 
> 'sort', I have to copy and paste the above code or do something hacky 
> like have a dict called "vars" and manipulate that, or factor the above 
> into a function and take the hit on the extra function call...
> 
The function call every time. You aren't going to notice the extra function 
call.

Once you've got everything working, and you've profiled it, and you've 
determined that that function call is a major overhead, then might be the 
time to consider optimising it, but not before then.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to