unreferenced (???) variable; prob. simple

Patrick Useldinger p.useldinger at myrealbox.com
Mon Sep 15 16:30:35 EDT 2003


On Mon, 15 Sep 2003 21:31:07 +0200, "Halfdan Holger Knudsen"
<s011362 at student.dtu.dk> wrote:

>goodday all - here's a snippet of code that just doesn't seem to work...at
>all! But I haven't got the faintest idea why I keep getting an unref.
>local var. error. Take a look - I know I can get good help here. And PS:
>Thanks beforehand. 
>

>begind = 0
>endind = 0
>
These variables are not know inside the function. The best solution is
to declare them as local variables in the function, as they really are
only of use in there, i.e.:

def stripfunc()
	begind=0
	endind=0
	[... here goes the rest ...]

-PU





More information about the Python-list mailing list