i18n conflicts with pdb debugging

Matt Nordhoff mnordhoff at mattnordhoff.com
Sun Nov 4 05:53:13 GMT 2007


John Arbash Meinel wrote:
> Robert Collins wrote:
>> On Sat, 2007-11-03 at 13:28 -0500, John Arbash Meinel wrote:
>>> So it is a gettext thing, but bzr-gtk makes wide use of it. I'm
>>> wondering if/when we do i18n in Bazaar we want to *not* use the _()
>>> shortcut, since it interferes badly with pdb.
>> Does it break things if you never type '_' in pdb?
> 
>> -Rob
> 
> It breaks if you do:
> 
> (pdb) variable
> 
> rather than doing
> 
> (pdb) p variable
> 
> It doesn't matter if you use '_' or not.
> 
> '_' is the "last value" in (pdb)
> 
> I guess so you can do stuff like
> 
> (pdb) 10 + 2
> 12
> (pdb) _ + 5
> 17
> (pdb) _ + 20
> 37
> 
> Or more reasonably
> 
> (pdb) foo()
> <An object>
> (pdb) _.status()
> ...

'_' is also the last value in the regular Python interactive prompt and,
I think, IPython..
-- 



More information about the bazaar mailing list