修饰符
#!/usr/bin/env python
# -*- coding:utf-8 -*-
class Provice:
# 静态方法
country = "中国"
def __init__(self,name):
temp = "xxx"
self.name = name
# 静态方法
@staticmethod
def xo(arg1, arg2):
print('xo')
# 普通方法,类中
def show(self):
print(self.name)
# 类方法
@classmethod
def xxoo(cls):
print('xxoo')
Provice.xo(1,2)
Provice.xxoo()
浙公网安备 33010602011771号