- Explain breakpoint and traceback.
- Apply today's ideas in a small Python program.
- Inspect output and improve the program after a test run.
- breakpoint
- traceback
- logger
- README
Reproduce a bug before changing code. Logging records useful context for maintainers; do not log secrets. Documentation should tell a new person how to install, run, test, and contribute.
Before coding, describe the input, processing, and output in ordinary language. Run the smallest possible version, then extend it one change at a time. Read the error message before asking for help.
import logging
logging.basicConfig(level=logging.INFO)
logging.info('Loading records')Read a traceback and identify file, line, and exception.
Replace one temporary print with a useful log line.
Write a README for an earlier project.
A log message appears during a normal run.
Record one bug report with reproduction steps.
- Official Python documentation
- Week resources
- Relevant retained examples in the repository, where referenced above