일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Class
- iterator
- 컴퓨터의 구조
- Decorator
- 프로그래머스
- 109. Convert Sorted List to Binary Search Tree
- LeetCode
- 43. Multiply Strings
- kaggle
- 715. Range Module
- Protocol
- data science
- shiba
- Python
- 밴픽
- 30. Substring with Concatenation of All Words
- Substring with Concatenation of All Words
- 운영체제
- Regular Expression
- 시바견
- Generator
- Convert Sorted List to Binary Search Tree
- 파이썬
- 315. Count of Smaller Numbers After Self
- t1
- attribute
- DWG
- concurrency
- Python Code
- Python Implementation
Archives
- Today
- Total
목록inheritance (1)
Scribbling
Python: Inheritance
Risks of subclassing built-in types - Generally, overriden methods in sub-classes are not called by other built-in methods. class StrangeDict(dict): def __setitem__(self, key, value): super().__setitem__(key, value*2) dic = StrangeDict(one=1) dic['1'] = 1 dic.update(three=3) print(dic) - This is because some methods are written with C-language. - So, use UserDict, UserList, UserString if you nee..
Computer Science/Python
2022. 4. 19. 17:16