Posted by : Rhyf Ahmad Sunday, May 10, 2015

You need to be able to get your data into your programs with ease, too. It’s no surprise then that Python makes reading data from files easy. Which is great, until you consider what can go wrong when interacting with data external to your programs…and there are lots of things waiting to trip you up!
When bad stuff happens, you need a strategy for getting out of trouble, and one such strategy is to deal with any exceptional situations using Python’s exception handling mechanism showcased in this chapter.


Data is external to your program
It’s all lines of text
Take a closer look at the data
Know your data
Know your methods and ask for help
Know your data (better)
Two very different approaches
Add extra logic
Handle exceptions
Try first, then recover
Identify the code to protect
Take a pass on the error
What about other errors?
Add more error-checking code…
…Or add another level of exception handling
So, which approach is best?
You’re done…except for one small thing
Be specific with your exceptions
Your Python Toolbox

Ebook Preview
Download the ebook now (2.13 MB)

If the link above doesn't work, try the link below

Leave a Reply

You can leave a comment to request any article(s), software(s), ebook(s) or report the dead link.
Then I will reply as soon as I can :)

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Recent Post

Recent Posts Widget

- Copyright © Madriva -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -