Are Class variables mutable?

This question already has an answer here:

  • Are static class variables possible? 16 answers
  • Python: Difference between class and instance attributes 6 answers

  • var is a static class variable of someClass .

    When you reach out to get x.var , y.var or some_other_instance.var , you are accessing the same variable, not an instance derived one (as long as you didn't specifically assigned it to the instance as a property).

    链接地址: http://www.djcxy.com/p/78776.html

    上一篇: 类变量对于不同的实例具有不同的值

    下一篇: 类变量是否可变?