Python API Checklist
Useful checklist for building good Python library APIs, based on "How to make a good library API" PyCon 2017 talk.
Checks are saved to your local storage
1. 간결함
2. 일관성
- 예시:
datetime.datetime(year, month, day, minute, second, microsecond)
vs datetime.timedelta(days, seconds, microseconds, milliseconds, minutes, hours, weeks)
- 좋은 예시: 제자리 정렬
numbers.sort()
vs 비제자리 정렬 sorted(numbers)
3. 유연함
4. 안전성
5. 결론