Skip to Content
Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition
book

Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition

by Brett Slatkin
November 2019
Intermediate to advanced content levelIntermediate to advanced
480 pages
13h 56m
English
Addison-Wesley Professional
Content preview from Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition

9. Testing and Debugging

Python doesn’t have compile-time static type checking. There’s nothing in the interpreter that will ensure that your program will work correctly when you run it. Python does support optional type annotations that can be used in static analysis to detect many kinds of bugs (see Item 90: “Consider Static Analysis via typing to Obviate Bugs” for details). However, it’s still fundamentally a dynamic language, and anything is possible. With Python, you ultimately don’t know if the functions your program calls will be defined at runtime, even when their existence is evident in the source code. This dynamic behavior is both a blessing and a curse.

The large numbers of Python programmers out there say it’s worth going without ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective Python: 125 Specific Ways to Write Better Python, 3rd Edition

Effective Python: 125 Specific Ways to Write Better Python, 3rd Edition

Brett Slatkin
Python for Programmers

Python for Programmers

Paul Deitel, Harvey Deitel

Publisher Resources

ISBN: 9780134854717