Some "pythonic" suggestions for Python

Raymond Hettinger python at rcn.com
Thu Nov 8 15:41:32 EST 2007


On Nov 8, 12:00 pm, Frank Samuelson
<newsdump0711.12.cud... at neverbox.com> wrote:
> def  foo(x,y): ...
> assigns the name foo to a function object.
>
> Why not use the = operator like most other assignments?

FWIW, the also binds the __name__ attribute:

   foo = lambda(x,y): ...
   foo.__name__ = 'foo'


Raymond




More information about the Python-list mailing list