On Mar 5, 9:44 pm, John Nagle <na...@animats.com> wrote:

>     All functions in Python can be replaced dynamically. While they're
> running. From another thread.  Really.

Indeed, and I find this feature VERY useful when coding.  Two places
I've used it are:

1) in GUI coding (say, when I have a panel of buttons, and each one
has its own associated function in my code -- but that function's name
is not part of the object definition itself) and

2) when profiling code, and I'm trying out various versions of a
function. For example, I'll write:

   for func in (func1, func2, func3):
       # do something with func()
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to