This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/11765] Pretty printer lookup fails with lambda functions
- From: "wittman at acm dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 1 Jul 2010 04:34:47 -0000
- Subject: [Bug python/11765] Pretty printer lookup fails with lambda functions
- References: <20100629041212.11765.wittman@acm.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.