Message45166
Logged In: YES
user_id=4771
The behavior is indeed the one described by the PEP but it is still surprising. As far as I'm concerned it is yet another reason why free variable bindings ("nested scopes") are done wrong in Python currently :-(
If you use the older trick "lambda x,y=y:x+y" instead, then both cases will agree (with the sensible result in my opinion). A few more issues and I'll start a campain for definition-time bindings of free variables :-( |
|
Date |
User |
Action |
Args |
2007-08-23 15:31:37 | admin | link | issue872326 messages |
2007-08-23 15:31:37 | admin | create | |
|