인프런 커뮤니티 질문&답변
클래스 내부 같은 객체 내에서의 덧셈뺄셈 질문
작성
·
285
답변 1
0
hyoj0942
질문자
해결했습니다 (_ _)
def __add__(self, x):
print('__add__ Method applied !')
return self._a_price - x._b_price
print(s1-s1)
이런식으로 사용하면 되는군요!
작성
·
285
답변 1
0
해결했습니다 (_ _)
def __add__(self, x):
print('__add__ Method applied !')
return self._a_price - x._b_price
print(s1-s1)
이런식으로 사용하면 되는군요!