Qile Liang's blog

归档 · 2023

首页

关于

归档

Can I call class variables without cls?

Can I call class attributes without cls in Python ?When we have a class variable but we find that we need call it in a non-class-method. Can we do operation like that? The answer is : Yes and no. Why the answer is yes?For any class attributes , we can use “self” to call them. After the first time we to do so, we will create an instance attributes implicitl..

更多