0
Follow
0
View

NameError: name 'privileges'没有定义.你是说“特权”吗?

cyzshow 注册会员
2023-02-25 23:16

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > the method privileges(), You should use self.privileges instead of privileges. You can modify the for loop for this method:

for privilege in self.privileges:
    print(f"- {privilege}")


This gives access to attribute privileges on the object instance.

lijian672 注册会员
2023-02-25 23:16

should be self.previleges