This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/11765] Pretty printer lookup fails with lambda functions


------- Additional Comments From wittman at acm dot org  2010-07-01 04:34 -------
Looking into it some more, it appears that lambdas do capture the variables
used.  The iteration variable in the list comprehension has global scope,
however, so the same reference is captured for every function.

Passing this lambda expression does work as expected, since the variable is
local to each lambda:
  lambda val, n=i: test(n)

Still not a bug in gdb, but good to know.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11765

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]