로딩
요청 처리 중입니다...

[파이썬 기초] - 확장/단항 산술연산자 및 타입 변환 내장함수 오버로딩

 [파이썬 기초] - 확장/단항 산술연산자 및 타입 변환 내장함수 오버로딩

이번에는 확장 산술 지정문 연산자와 단항 산술연산자 및 타입 변환 내장함수 오버로딩에 대해 알아보자. 확장 산술 지정문 연산자 메소드 연산자 __iadd__(self, other) += __isub__(self, other) -= __imul__(self, other) *= __imatmul__(self, other) @= __itruediv__(self, other) /= __ifloordiv__(self, other) //= __imod__(self, other) %= __ipow__(self, other[, modulo]) **= __ilshift__(self, other) <<= __irshift__(self, other) >>= __iand__(self, other) &= __ixor__(self, other) ^= __ior__(self, other) |= 위의 표는 확장 산술 지정문(augmented arithmetic assignment) 연산자에 대한 메소드이다.

만...

# Python # 객체 # 단항연산자 # 메소드 # 연산자오버로딩 # 이항산술연산자 # 파이썬 # 확장지정문