Python入门之面向对象和类
定义Python中的类

举例1:
class Student:
pass
print(id(Student)) #1149225945800
print(type(Student)) #<class 'type'>
print(Student) #<class '__main__.Student'>
举例2:
class Student:
native_place='吉林' #类属性
def __init__(self,name,age):
self.name=name
self.age=age
#实例方法
def eat(self):
print("学生在吃饭")
#静态方法
@staticmethod
def method():
print("我是静态方法")
#类方法
@classmethod
def cm(cls):
print("我是类方法")
https://www.886321.xyz/bianchengkong/6744.html
半抹灯芯 : https://www.cnblogs.com/wanxiangsucai/p/17567263.html