반응형
참고
-
Python: 클래스, 멀티스레딩, 멀티프로세싱(Class, Multi threading, Multi Processing) 참고Python 2021. 4. 3. 00:45
class Line: def __init__(self, length): self.length = length def __del__(self): print("{}길이의 선 삭제".format(self.length)) def __repr__(self): return str(self.length) def __add__(self, other): return self.length + other.length def __lt__(self, other): return self.length < other.length def __eq__(self, other): return self.length == other.length def __getattr__(self, item): pri..