[wingide-users] Debugging list comprehension
mj at zopatista.com
Fri Aug 11 03:31:48 MDT 2006
Luc Bourhis wrote:
> I really like the syntax of list comprehension but Wing debugger does
> not step in the loop in them and therefore I have often to give up on
> them. Is this an inherent limitation of the Python debugging API? If it
> is not, I would really love Wing to offer that feature.
List *comprehensions* ("[i for i in range(10)]", square brackets) are
directly looped over by the debugger, at least in my 2.1.1 installation.
List *generators* ("(i for i in range(10))", round brackets) are also
looped over, but at the moment they are consumed (which may be at a
later point). You need to set a breakpoint at the point of consumption:
( ) gen = (i for i in range(10))
(*) consumed = list(gen)
Where (*) denotes a breakpoint.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 252 bytes
Desc: OpenPGP digital signature
Url : /pipermail/wingide-users/attachments/20060811/ec279120/signature.bin
More information about the wingide-users