[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Paralax snow flaks: Some tipps for enhancing the performance?




You guessed it right.  
the first time you call dirty in the main() is in that for loop.  So there\'s no value in the variable yet, not even None.


> By mischance the Interpreter splits out this:
> 
> File \"schneeflocken_dirty_rects.py\", line 69, in main
>     for i in dirty:
> UnboundLocalError: local variable \'dirty\' referenced before assignment
> 
> Hmm, i don\'t really understand this error message. It means something 
> like \"want\'s to deal with a variable which hasn\'t been declared yet\" ??? 
> Hmm, i think will toy around with this problem a little bit!
> 
> greets, Ludwig