[Tutor] anecdote in the workplace about try,except clause

Sean 'Shaleh' Perry shalehperry@home.com
Fri, 17 Aug 2001 08:16:52 -0700 (PDT)


> 
> try: doesn't have it's own scope, so data doesn't go out of scope. But it
> was never assigned to in that loop.
> 
> I'd expect the print to print the data from the previous run through the
> loop.
> 

you are right of course.  The problem as I explained in another mail was that
the first line in the file triggered the exception.  So data was never assigned
to and therefore when the print statement is reached does not exist and the
NameError occurs.