Home arrow Python arrow Python 101 (part 8): An Exceptionally Clever Snake

Python 101 (part 8): An Exceptionally Clever Snake

In this concluding article of the Python 101 series, find out howto use Python's exception-handling routines to trap and resolve programerrors, learn to generate and use custom error messages, and get acquainteda bunch of useful (and free!) Python resources online.

  1. Python 101 (part 8): An Exceptionally Clever Snake
  2. Anatomy Of An Exception
  3. Trying Harder
  4. Different Strokes
  5. Passing The Buck
  6. Bad Boys
  7. Raising The Bar
  8. Strong Pythons (And The Exceptions That Love Them)
  9. The End Of The Affair
By: Vikram Vaswani, (c) Melonfire
Rating: starstarstarstarstar / 8
August 23, 2001

print this article


If you've been following along since the beginning, I think you'll agreewith me that it's certainly been an interesting eight weeks.

Together, we've visited all the standard attractions - we've thumbedthrough the rulebook for strings, numbers, lists, dictionaries and thoseoddly-named tuples; mucked around with system files and directories;packaged code into functions and functions into modules; and dissected thePython interpreter and some of Python's innumerable built-in functions -and indulged in some decidedly non-standard activities - learning the namesof exotic Italian dishes; stomping on all kinds of creepy-crawlies;attempting to con unwitting customers into purchasing air in a bottle; andhooking up with old flames, new superheroes and the complete cast of "StarWars".

In this concluding article, I'm going to be demonstrating Python'serror-handling routines, and showing you how to wrap your code in them toavoid violent - and potentially embarrassing - flame-outs. I'll beexplaining the different types of errors you might encounter and the Pythonconstructs available to manage them, with examples that demonstrate justhow powerful this capability really is.

Talk about getting your money's worth!

>>> More Python Articles          >>> More By Vikram Vaswani, (c) Melonfire

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Python Big Data Company Gets DARPA Funding
- Python 32 Now Available
- Final Alpha for Python 3.2 is Released
- Python 3.1: String Formatting
- Python 3.1: Strings and Quotes
- Python 3.1: Programming Basics and Strings
- Tuples and Other Python Object Types
- The Dictionary Python Object Type
- String and List Python Object Types
- Introducing Python Object Types
- Mobile Programming using PyS60: Advanced UI ...
- Nested Functions in Python
- Python Parameters, Functions and Arguments
- Python Statements and Functions
- Statements and Iterators in Python

Developer Shed Affiliates


Dev Shed Tutorial Topics: