Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Join
- dataframe
- javascript
- 데이터시각화
- NumPy
- Stack
- 선그래프
- 파이썬
- openCV
- type hint
- 노마드코딩
- 가상환경
- 자료구조
- programmers
- Matplotlib
- python
- 백준
- 알고리즘스터디
- 정보처리기사 c언어
- 알고리즘 스터디
- 코딩테스트
- Algorithm
- aws jupyter notebook
- String Method
- MySQL
- pandas
- Selenium
- 알고리즘
- queue
- 프로그래머스
Archives
- Today
- Total
목록pyright (1)
조금씩 꾸준히 완성을 향해

mypy 런타임에서 타입을 체크하는 도구이다. Type hint의 타입을 기반으로 해 오류를 잡아낸다. ▶ mypy 설치 $ pip install mypy ▶ mypy 실행 $ mypy filename.py ▶ mypy실행과 파일 출력 동시에 하기 $ mypy filename.py && python filename.py ▶ 결과 아래와 같은 함수를 예시로 들어 보자. type hint는 정수로 지정했는데 다른 타입을 넣어 함수를 호출하는 경우이다. def cal_add(x: int, y: int) -> int: return x + y print(cal_add(1, 3)) print(cal_add('hello', 'world')) print(cal_add([1,2,3], [4,5,6])) mypy 를 실행..
Python/문법
2022. 9. 29. 08:42