CODEDRAGON ㆍDevelopment/Python
수치 연산자 중복
연산자 중복을 위해 미리 정의된 메서드입니다.
|
매직 메소드 |
연산자 |
|
__add__(self, other) |
+ |
|
__sub__(self, other) |
- |
|
__mul__(self, other) |
* |
|
__div__(self, other) |
/ |
|
__floordiv__(self, other) |
// |
|
__mod__(self, other) |
% |
|
__divmod__(self, other) |
divmod() |
|
__pow_(self, other[, module]) |
pow() ** |
|
__lshift__(self, other) |
<< |
|
__rshift__ (self, other) |
>> |
|
__and__ (self, other) |
& |
|
__xor__ (self, other) |
^ |
|
__or__ (self, other) |
| |
수치 단항 연산자 중복
|
메소드 |
연산자 |
|
__neg__ (self) |
- |
|
__pos__ (self) |
+ |
|
__abs__ (self) |
abs() |
|
__invert__ (self) |
~ 비트 반전 |
수치 형 변환 메소드
|
메소드 |
연산자 |
|
__complex__ (self) |
complex() |
|
__int__ (self) |
int() |
|
__long__ (self) |
long() |
|
__float__ (self) |
float() |
'Development > Python' 카테고리의 다른 글
| 확률질량 함수(Probability mass function) (0) | 2020.02.12 |
|---|---|
| rvs() (0) | 2020.02.12 |
| pivot() (0) | 2020.02.12 |
| read_html() (0) | 2020.02.12 |
| ffill(), bfill() (0) | 2020.02.12 |