A function object can get bound to a name, too: def foo(x): return x + 1
foo = lambda x: x - 1 assert foo(1) == 0 ~/santa On Sat, Mar 5, 2011 at 7:46 PM, Corey Richardson <kb1...@aim.com> wrote: > On 03/05/2011 10:23 PM, MRAB wrote: > > Having a fixed binding could be useful elsewhere, for example, with > > function definitions: > > [..] > > fixed PI = 3.1415926535897932384626433832795028841971693993751 > > > > fixed def squared(x): > > return x * x > > This question spawns from my ignorance: When would a functions > definition change? What is the difference between a dynamic function and > a fixed function? > > -- > Corey Richardson > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list