Python Debugging

Python Debugging

book type
0 Review(s) 
FL/392664/R
English
In stock
грн105.00
грн94.50 Save 10%

  Instant download 

after payment (24/7)

  Wide range of formats 

(for all gadgets)

  Full book 

(including for Apple and Android)

Debugging is the process of finding and removing “bugs” or defects in a program. To help my daughter with her first Python class, I looked around for information on debugging that I could share with her. I wanted a simple guide with everything in one place and suggestions for how to go about the process of debugging. Initially, my research focused on gathering examples of common issues, but I knew something more was needed. After all, what happens if there is no example of the “bug” that you’re experiencing?I knew I needed to provide a debugging “foundation.” Not just how to use debugging tools, but when to take action and why. With that goal in mind, Chapters 1 through 6 build a debugging arsenal, so you’re ready to tackle the examples in Chapter 7. Each example begins with “References” to the related topics covered in earlier chapters. So theoretically, you could jump right into the examples in Chapter 7.This book includes an extensive and detailed Table of Contents. I also made a point to cross-reference topics so you can easily locate whatever you’re interested in from any point in the material. This approach means you can pick up the book at any time and quickly jump back in where you left off. Or if you prefer, you can hop around from topic to topic with as much detail as you want.Hopefully, after reading this book, you won’t feel like this man who posted a plea for help on a chat board. His frustration show’s through in his comment, “For the love of God, how is this done?” Instead, you’ll know exactly how it’s done and have fun doing it!1.1 OverviewHow you may ask, are we going to build your debugging arsenal? Let’s begin with these topics.• How to use the debug environment.• The Python Error Codes and specific examples of how they happen.• Step-by-step instructions on the process of debugging code.• Finding the information you need tomodify your program: help on Syntax, Functions, Classes, and more.The goal of debugging is a working program, and debugging is just part of the process of writing code. When I realize I have a “bug,” I’ll experiment and try a few things to find a clue where the issue is. You’ll see this process in the examples in Chapter 7, where I use different approaches from my “debugging toolbox” to isolate an issue. You might take a different approach to the sample problem, and there is no wrong approach. The idea is to try a few things and see what works.In this book, I demonstrate Python using the open-source Anaconda Data Science Distribution that includes Python version 3.7. Spyder, the Scientific Python Development Environment, comes with Anaconda. You may notice slight differences in screenshots, depending on whether I am using Spyder on my Windows or Mac computer.1.2 What This Book is AboutMy intent in writing this book was not to provide a guide to Python Programming. Instead, this book is specifically about debugging Python with Anaconda’s Spyder application. The concepts around Python debugging apply equally to other environments, but the screens and debugging tools may vary slightly.You may wonder why I’ve included Python Basics in Chapter 3. I found it difficult to explain an IndexError without first explaining data structures and their indexes. Similarly, a Dictionary KeyError doesn’t mean much without an understanding of a Dictionary. Syntax errors are fairly obvious in Spyder, but it doesn’t hurt to have a brief explanation of the syntax the parser expects.Finally, Chapter 6 demonstrates how to view values, types, and the length of objects. Since the syntax varies by the type of object, I wanted to provide a reference with the exact syntax for each object type.1.3 What’s Next?The next chapter walks you through installing Anaconda and the basic Spyder environment. We’ll also look at an overall plan for debugging code.

FL/392664/R

Data sheet

Language
English

Reviews

Write your review

Python Debugging

Debugging is the process of finding and removing “bugs” or defects in a program. To help my daughter with her first Python class, I looked around for info...

Write your review

Products from this category: