8. Robustness-and-Performance¶
- 8.1. Take Advantage of Each Block in try/except/else/finally
- 8.2. Consider contextlib and with Statements for Reusable try/finally Behavior
- 8.3. Use datetime Instead of time for Local Clocks
- 8.4. Make pickle Reliable with copyreg
- 8.5. Use decimal When Precision Is Paramount
- 8.6. Profile Before Optimizing
- 8.7. Prefer deque for Producer–Consumer Queues
- 8.8. Consider Searching Sorted Sequences with bisect
- 8.9. Know How to Use heapq for Priority Queues
- 8.10. Things to Remember
- 8.11. Consider memoryview and bytearray for Zero-Copy Interactions with bytes