Skip to content Skip to sidebar Skip to footer

Python Pdb Lambda Function Global Name Error

I was testing a fix using pdb.set_trace() to make sure it worked the way I expected before implementing it and kept getting a weird error. (Pdb) test = [1,2,3,4,4,3,2,1] (Pdb) max

Solution 1:

I can confirm this issue with Python 2.7. There is a bug report for Python 3 which suggests a workaround: interact at the pdb prompt drops you into an interactive session which is populated with globals() and locals() and your lambda should work as expected.


Post a Comment for "Python Pdb Lambda Function Global Name Error"