is연산자1 __eq__ Method 출처 : https://www.pythontutorial.net/python-oop/python-__eq__/ Introduction to the Python __eq__ method class Person: def __init__(self, first_name, last_name, age): self.first_name = first_name self.last_name = last_name self.age = age 그리고 Person 클래스의 두 인스턴스를 만듭니다. john = Person('John', 'Doe', 25) jane = Person('Jane', 'Doe', 25) 이 예제에서 john 객체 와 jane 객체는 동일한 객체가 아닙니다. 그리고 is 연산자를 사용하여 확인할 수 있습니.. 2023. 4. 3. 이전 1 다음