When defining a Python class, class members are like global variables for the class. Then, I do not understand why global variables do exist ? Shouldn t we always use class members instead ?
Class members are like global variables for the class. Global variables are like class members for the module.
It's really that simple.
P.S. Just in case you are a Java programmer: yes, you can have more than one public class in your module; yes, you should use this when appropriate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With