Loading topic
apply_discount function from the Topic Spine.5 min readunittest.mock.6 min readhelp(), IDEs, and documentation generators read it. This chapter covers how to get an AI assistant to draft docstrings that state a function's contract, and how to catch the mistakes it tends to make6 min readpython -m doctest. It also assumes you have used an assistant in a multi-turn chat and that you have read 6 min readapply_discount. It covers what can go wrong after the draft exists. There are three risks: what you send to the assistant, what it gets wrong, and what the7 min readapply_discount, and that you have reviewed them by hand. Here you turn that manual review into steps that run eve6 min read