Name: Anonymous 2009-01-12 14:10
The third version of FIOC ( Python3000 for you cheese lovers ) is kind of lame, even lamer than classic FIOC. Minor changes suck and bigger ones weren't necessary.
>>> x = 10
>>> def f(n):
... if n: x = 20
... print x
...
>>> f(5)
20
>>> f(0)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 3, in f
UnboundLocalError: local variable 'x' referenced before assignmentf(0) printing 10.