![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: why UnboundLocalError?
From: <and-google@doxdesk.com>
Date: Sat Jul 09 2005 - 14:26:46 CEST
Alex Gittens wrote:
> I'm getting an UnboundLocalError
> def fieldprint(widths,align,fields): [...]
There's your problem. You are assigning 'fields' a completely new
So when you assign an identifier in a function Python assumes that you
What you probably want to do is keep 'fields' pointing to the same
del fields[:widths[i]]
-- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/Received on Thu Sep 29 16:51:00 2005 |