Home > Store

Better Python Code

Register your product to gain access to bonus material or receive a coupon.

Better Python Code

eBook

  • This product currently is not for sale.
  • Includes EPUB and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    Adobe Reader PDF The popular standard, used most often with the free Acrobat® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

Not for Sale

Description

  • Copyright 2024
  • Edition: 1st
  • eBook
  • ISBN-10: 0-13-832085-3
  • ISBN-13: 978-0-13-832085-0

Python is one of the most widely used programming languages in the world. It is used everywhere from primary school education to workaday web development, to the most advanced scientific research institutes of the world. However, like all programming languages, Python has a collection of "Pythonic" ways of accomplishing tasks that are easy to overlook, especially when habits are borrowed wholesale from work in other programming languages.

Better Python Code is a guide to Pythonic programming. The book presents common mistakes that Python developers make--even Python developers who have used the language for years--often because Python sometimes presents "attractive nuisances." Throughout, the book is a guide to better programming in the core Python language.

Each section shows a concrete but concise example of some misunderstanding or bad habit in action. Each section contains a description of what is wrong with the sample code and a suggestion for one or more better ways to code equivalent functionality without the initial pitfall. Every pitfall addressed in this book reflects foibles, errors, and misunderstandings that the author as seen in concrete, widely used code bases written by experienced developers, over his 25 years of writing Python.

Both beginners and developers with decades of experience will learn to correct limitations in the code they write after reflecting on these discussions.

Downloads

Downloads

Please visit the author's site to download data and code files: https://gnosis.cx/better

Sample Content

Table of Contents

Foreword
Preface
About the Author

Introduction
Chapter 1: Looping Over the Wrong Things
Chapter 2: Confusing Equality with Identity
Chapter 3: A Grab Bag of Python Gotchas
Chapter 4: Advanced Python Usage
Chapter 5: Just Because You Can, It Doesn't Mean You Should
Chapter 6: Picking the Right Data Structure
Chapter 7: Misusing Data Structures
Chapter 8: Security
Chapter 9: Numeric Computation in Python
Appendix: Topics for Other Books

Index

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.