Brett Slatkin is a Principal Software Engineer at Google in the Office of the CTO, focusing on emerging technologies. He co-founded Google Surveys, launched Google Clouds first product (App Engine), and co-created the PubSubHubbub protocolall using Python. Brett has been writing Python code professionally for the past 19 years and has made numerous contributions to open-source projects.
Preface xvii
Acknowledgments xxiii
About the Author xxv
Chapter 1: Pythonic Thinking 1
Item 1: Know Which Version of Python Youre Using 1
Item 2: Follow the PEP 8 Style Guide 3
Item 3: Never Expect Python to Detect Errors at Compile Time 6
Item 4: Write Helper Functions Instead of Complex Expressions 8
Item 5: Prefer Multiple-Assignment Unpacking Over Indexing 11
Item 6: Always Surround Single-Element Tuples with Parentheses 16
Item 7: Consider Conditional Expressions for Simple Inline Loglƒ1