Bug or feature?
Gerson Kurz
gerson.kurz at t-online.de
Sun Sep 2 01:33:38 EDT 2001
More information about the Python-list mailing list
Sun Sep 2 01:33:38 EDT 2001
- Previous message (by thread): Pmw blt problem
- Next message (by thread): Bug or feature?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 1 Sep 2001 15:25:31 -0400, "Tim Peters" <tim.one at home.com> wrote: >Neither, really -- it's just the way it works. A def in Python is an >executable stmt, and, when executed, binds the name following the "def" to >the appropriate code object, in the appropriate namespace. Hey, the more I dive into python the more cool things it has. This makes writing def a(x): ... def b(x): ... b,a = a,b possible :) And even this works as expected: funcs = [] def a(): print "code 1" funcs.append(a) def a(): print "code 2" funcs.append(a) for func in funcs: func()
- Previous message (by thread): Pmw blt problem
- Next message (by thread): Bug or feature?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list