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

Re: [pygame] Declaring variables in function as if at code's line-level



On Sat, Mar 10, 2012 at 6:30 PM, Brian Brown <brobab@xxxxxxxxx> wrote:
Hi pygame users, just a simple question-- How can one cause variables
at "function-level" to behave like variables at "line-level"? (With
basic python code) I just want to avoid using "global" over and over
again (in many different functions) while I want to declare, use, and
delete all my game's variables inside functions.Thanks.

It should make my program very simple and straight-forward if I could
do this. (As I have explained in the previous replies to this thread)
I would like to know how it can be done-- without immature,
unproductive statements like:
"Don't freak out at the fact that I used the "class" keyword."
Thank you.

Just to be clear, you decided not to believe Ciro when he answered your question by saying that you need the global keyword? And you decided not to believe me when I answered your question by saying the same thing? And you decided not to rephrase your question after Ciro said it was difficult to understand, and I suggested you clarify what you mean by the term "line-level" that you seem to have made up?

And now you're hoping that someone else will take the time to respond to you, despite your apparent disregard for correct answers and suggestions?

Just being clear. Good luck with that.

-Christopher