[ python-Bugs-1072853 ] thisid not intialized in pindent.py script

SourceForge.net noreply at sourceforge.net
Mon Feb 20 14:13:04 CET 2006


Bugs item #1072853, was opened at 2004-11-24 23:13
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1072853&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Demos and Tools
Group: Python 2.3
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Niraj Bajpai (nbajpai)
>Assigned to: Georg Brandl (gbrandl)
Summary: thisid not intialized in pindent.py script

Initial Comment:
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

----------------------------------------------------------------------

Comment By: Georg Brandl (birkenfeld)
Date: 2005-06-26 20:23

Message:
Logged In: YES 
user_id=1188172

Fixed in CVS Tools/scripts/pindent.py r1.13, r1.12.12.1.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2004-12-19 22:32

Message:
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.

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2004-12-19 22:12

Message:
Logged In: YES 
user_id=80475

Tim, cvs ann says this is your code.

----------------------------------------------------------------------

Comment By: Niraj Bajpai (nbajpai)
Date: 2004-11-25 02:50

Message:
Logged In: YES 
user_id=1165734

I am running on solaris-8 and command I used is as follows:
pindent.py -c -e <file_name>

This is for some special cases (I do not know, haven't digged 
into) and does not happen for all the mis-formatted files.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1072853&group_id=5470


More information about the Python-bugs-list mailing list