Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python 3 sucks

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.

Name: Anonymous 2010-04-20 14:15

>>59
>>> 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 assignment


I humbly expected f(0) printing 10.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List