왜 파이썬 클래스에서 __init__를 사용합니까? 수업 초기화를 이해하는 데 문제가 있습니다. 요점은 무엇이며 어떻게 포함해야하는지 어떻게 알 수 있습니까? 수업에서 쓰는 것은 다른 유형의 사고와 함수를 만드는 것이 필요합니까 (함께 함수를 만든 다음 클래스에서 랩하여 재사용 할 수 있다고 생각했습니다. 작동합니까?) 예를 들면 다음과 같습니다. class crawler: # Initialize the crawler with the name of database def __init__(self,dbname): self.con=sqlite.connect(dbname) def __del__(self): self.con.close() def dbcommit(self): self.con.commit() 또는 ..