python - In ipdb, how to query a variable which as the same name as a command? -


i'm trying debug function quicksort(a, l, r) has local variable called l. however, in ipdb corresponds command view code around current line. i'm seeing this:

ipdb> dir() ['a', 'ipdb', 'l', 'r'] ipdb> [2, 4, 6, 1, 3, 5, 7, 8] ipdb> l      14         a[0], a[p] = a[p], a[0]      15       16 def quicksort(a, l, r):      17         # n = len(a)      18         import ipdb; ipdb.set_trace() ---> 19         if len(a) == 1:      20                 return      21         else:      22                 # choose_pivot(a)      23                 q = partition(a, l, r)      24                 quicksort(a, l, q-1) 

what want in case see value of l, however. there way 'escape' default l command , see value of l variable?

i found can p(l) see __repr__ representation (or print(l) see __str__ representation).


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -