[Python-ideas] pdb.set_trace may not seem long
Ned Batchelder
ned at nedbatchelder.com
Mon Apr 9 18:26:17 CEST 2012
On 4/9/2012 10:20 AM, Yuval Greenfield wrote:
> Proposal:
>
> 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()
--Ned.
>
> Yuval
>
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120409/1a100c29/attachment.html>
More information about the Python-ideas
mailing list