Conversation
Notices
-
Hattie Cat (hattiecat@shitposter.club)'s status on Friday, 16-Feb-2018 20:23:11 EST
Hattie Cat
Python is retarded. Brain-damaged scope rules make it hard to write closures. Compare the following. I hate you Guido, and your cult.
def poo():
x=42
def moo():
x += 1
return x
return moo
m=poo()
print m
> UnboundLocalError: local variable 'x' referenced before assignment
versus
def poo():
x=[42]
def moo():
x[0]+=1
return x[0]
return moo
m=poo()
print m
> 43