python 声明类必须要用def __init__(self):

如果直接在class里面声明变量,那么是全局的变量,也就是说,一个改变,全部跟着改变
posted @ 2022-04-26 20:07  博二爷  阅读(144)  评论(0)    收藏  举报