#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목class 함수 중 멤버함수 구현 중2022-05-29 00:12
작성자

class A:

 def__ init__(self, a):

self.data = a

def __add__(self, other):

return str(self.data + other.data)


__add__ 함수 self.data + other.data 에서 self.data 는 이해가 가는데 other은 왜 .data 를 받을 수 있는지 그  원리가 궁금합니다 



댓글
이전[re]step_14_data_collection_types 질문 있습니다.2022-05-30
다음[re]class 함수 중 멤버함수 구현 중2022-05-29