gamename schrieb: > Hi, > > I'm a recent convert from TCL. One of the more powerful aspects of > TCL is the ability to rename a function at will (generally for testing > purposes). > > Example from the tcl doc: > > rename ::source ::theRealSource > set sourceCount 0 > proc ::source args { > global sourceCount > puts "called source for the [incr sourceCount]'th time" > uplevel 1 ::theRealSource $args > } > > So, is such a thing possible in Python?
def foo(): print 'foo' bar = foo bar() Is it that what you mean? Diez -- http://mail.python.org/mailman/listinfo/python-list