[Python-ideas] pdb.set_trace may not seem long
ned at nedbatchelder.com
Mon Apr 9 18:26:17 CEST 2012
On 4/9/2012 10:20 AM, Yuval Greenfield wrote:
> pdb.st <http://pdb.st> = pdb.set_trace
> I find myself typing this a lot:
> import pdb;pdb.set_trace()
> It's the int3 of python. When I want to debug an exact point in the
> code I use the above line.
> I hope I don't come off as spoiled, it's just that import pdb;pdb.pm
> <http://pdb.pm>() is so short that I can't help but wonder how better
> my life would be if I could do:
> import pdb;pdb.st <http://pdb.st>()
> What do you guys think? I know aliasing isn't cool since TSBOAPOOOWTDI
> but practicality beats purity....
I have exactly one abbreviation defined in my .vimrc:
abbrev pdbxx import pdb;pdb.set_trace()
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas