Error Testing

Chris Angelico rosuav at gmail.com
Sat Oct 19 09:42:13 EDT 2013


On Sun, Oct 20, 2013 at 12:34 AM, Scott Novinger <scnovinger at gmail.com> wrote:
> I read the link on Handling Exceptions.  The first bit of code worked for my purposes. I was able to reduce my number of lines of code significantly and my program works! Thank you all for your help solving this problem!

As you get accustomed to exception handling, you'll find that it's a
really clean and easy way to... well, handle exceptional situations :)
Tip: In quick throw-away scripts that are run from the command line,
don't even bother catching most exceptions. Just let 'em happen if
they want to happen... your script will terminate with an error
message, and you can deal with it as a human. That saves you even more
code!

> My plan is to create several different programs that perform specific Algebraic operations.  My boys are learning Algebra 2 and I thought it might be a fun way to help us all learn Algebra and programming together.  Python seems to be a good language for learning how to program.

It is an excellent language for that. It's also a great language for
applications. It may not be the fastest in the world, but all
computers wait at the same speed anyway...

Just one thing: When you post here, please either don't use Google
Groups, or follow the advice here:

https://wiki.python.org/moin/GoogleGroupsPython

Preferably, just avoid GG, as a number of people just filter those
posts out. It's not an indictment of you as a person, but the majority
of GG posts are, quite frankly, very annoying for the reasons set out
in the wiki article.

Hope to see you around more!

ChrisA



More information about the Python-list mailing list