Bug or feature?

Aahz Maruch aahz at panix.com
Tue Sep 4 09:46:46 EDT 2001


In article <3b91c3bb.1689421 at news.t-online.de>,
Gerson Kurz <gerson.kurz at t-online.de> wrote:
>
>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()

Yup.  You're getting sucked in.  ;-)
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Hugs and backrubs -- I break Rule 6                 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista   

"Plus ca change, plus c'est la meme chose."



More information about the Python-list mailing list