avoid the use of globals #4
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now you have a lot of global variables. A generally accepted better way to program (and part of The Zen of Python) is to use parameters
so instead of
you would have
Macej was saying that it was better not to use global variables. I just hadn't figured out how to do it better yet.
The technical term "variables" refers to free-standing references to values.
The technical term "arguments" refers to references to values which are "received" by a function
The technical term "parameters" refers to the definition of "arguments" in the function definition itself
When you read the command line values into a local variable you can then pass it into the function as an argument.
(not sure if that's real python, but I think it looks something like that)
Thank you. Fixed in
024c033ac2