파이썬 버전을 중첩 된/내부 클래스를 사용하는대한 파이썬 클래스는 다른 클래스에
class Backup:
class Create:
@staticmethod
def all():
print('create all')
@staticmethod
def user(username):
print('create user: ' + username)
@staticmethod
def file(filename):
print('create file: ' + filename)
class Restore:
@staticmethod
def all():
print('restore all')
@staticmethod
def user(username):
print('restore user: ' + username)
@staticmethod
def file(filename):
print('restore file: ' + filename)
class Delete:
@staticmethod
def all():
print('delete all')
@staticmethod
def user(username):
print('delete user: ' + username)
@staticmethod
def file(filename):
print('delete file: ' + filename)
을하지만 자신의 모듈에 중첩 된 클래스를 이동하려면 가져 오지 만 어떻게해야할지 모르겠다. 여기에 몇 가지 유사한 스택 오버플로 질문을 기반으로 최근 시도했다. 분명히 작동하지 않았다 : 그것은 것 할 Backup.Create.all()
확인'슈퍼()'기능 : https://stackoverflow.com/questions/576169/understanding-python-super-with-init-methods –
모습에도 불구하고, 나는 그가 찾고 생각하지 않습니다 모든 기능을 확장하십시오. 그는 그들을 중첩 시키려하고있다. –