Issue 1072853: thisid not intialized in pindent.py script (original) (raw)

Hi there,

I am using python version 2.3.4.

For some cases when using pindent.py with -c and -e option as follows, the variable "thisid" does not gets initialized before it hits line #310 ( current, firstkw, lastkw, topid = indent, thiskw, thiskw, thisid), this is traced all the way back to line #268 (for my case it fell in this else clause ... didn't try to look the exact scenario causing this) ... adding

thisid = '' help fix the code for my scenario.

If this fix is good for all scenario, please roll this over to main line code.

Regards, Niraj

Logged In: YES user_id=31435

ann says that because rev 1.10 mechanically converted the whole file from tab indents to 4-space indents. I've never looked at this code, and never even used it. I care about reindent.py, but not pindent.py (it's Guido's baby, BTW).
Unassigned myself.