Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57103

Re: Error Testing

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.086
X-Spam-Evidence '*H*': 0.83; '*S*': 0.00; 'scripts': 0.03; 'wiki': 0.03; 'subject:Error': 0.07; 'python': 0.11; 'article.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'handling,': 0.16; 'problem!': 0.16; 'exception': 0.16; 'language': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'seems': 0.21; 'command': 0.22; 'programming': 0.22; 'error': 0.23; 'url:moin': 0.24; 'together.': 0.24; 'script': 0.25; 'handling': 0.26; 'posts': 0.26; 'post': 0.26; 'world,': 0.26; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'fastest': 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'lines': 0.31; 'that.': 0.31; 'url:wiki': 0.31; 'catching': 0.31; 'operations.': 0.31; 'terminate': 0.31; 'run': 0.32; 'quite': 0.32; 'worked': 0.33; 'url:python': 0.33; 'advice': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'really': 0.36; 'are,': 0.36; 'url:org': 0.36; 'thank': 0.38; 'filter': 0.38; 'saves': 0.38; 'solving': 0.38; 'handle': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'how': 0.40; 'even': 0.60; 'read': 0.60; 'easy': 0.60; 'most': 0.60; 'hope': 0.61; 'first': 0.61; 'here:': 0.62; "you'll": 0.62; 'happen': 0.63; 'more': 0.64; 'different': 0.65; 'great': 0.65; '20,': 0.68; 'line,': 0.68; 'person,': 0.68; 'computers': 0.72; 'boys': 0.84; 'subject:Testing': 0.84; 'works!': 0.91; 'scott': 0.93; 'more!': 0.95; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=+npUUanHZRw03NGyxqI4maQyOWMUYomQBiLIVJxY3p0=; b=UpKS2Y/h8rrYrV4ZLgf1U7BGZLRRAKNip6Bw2B8KuRJG9waMd1LxIQXKLYqDa6MmKk eSxjhQmijjGfvm/L2Pd1nA8wA5H2i6jcHqH5ELlztUDa8dTi2Wo8xbA9x2Q+ct04hUsj 9S7WAlDM1gd26+W3ZV0lbOgfKFQTR+Rh29LlL01SDVquB4ilehYEDbMkq2taQxvqI4ki iZ6Oq3aN1kCYfASXkbfzFuXhZiASOuuyWFMtzRQUEMSMiqyJs/IzDk0pyXFsLrks/GBL xL/VdRMbfjXCKJckvqMmxUA3PCbEP8tYJeCWDKtcFvU1FQx/Q/F34Ejp1R65IwBys6/x W2xw==
MIME-Version 1.0
X-Received by 10.68.101.225 with SMTP id fj1mr8305105pbb.8.1382190133559; Sat, 19 Oct 2013 06:42:13 -0700 (PDT)
In-Reply-To <ea2d79c5-e116-458f-a77c-700e748323e2@googlegroups.com>
References <33549834-2f27-47f3-abea-eb3486909dec@googlegroups.com> <mailman.1253.1382186251.18130.python-list@python.org> <ea2d79c5-e116-458f-a77c-700e748323e2@googlegroups.com>
Date Sun, 20 Oct 2013 00:42:13 +1100
Subject Re: Error Testing
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1259.1382190142.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1382190142 news.xs4all.nl 15872 [2001:888:2000:d::a6]:44025
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:57103

Show key headers only | View raw


On Sun, Oct 20, 2013 at 12:34 AM, Scott Novinger <scnovinger@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Error Testing Scott Novinger <scnovinger@gmail.com> - 2013-10-19 05:23 -0700
  Re: Error Testing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-19 13:37 +0100
    Re: Error Testing Scott Novinger <scnovinger@gmail.com> - 2013-10-19 06:34 -0700
      Re: Error Testing Chris Angelico <rosuav@gmail.com> - 2013-10-20 00:42 +1100
      Re: Error Testing rusi <rustompmody@gmail.com> - 2013-10-19 09:22 -0700
        Re: Error Testing Chris Angelico <rosuav@gmail.com> - 2013-10-20 09:28 +1100
        Re: Error Testing Ned Deily <nad@acm.org> - 2013-10-19 15:46 -0700
        Re: Error Testing Chris Angelico <rosuav@gmail.com> - 2013-10-20 10:02 +1100
        Re: Error Testing Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-10-20 12:18 -0400
  Re: Error Testing Ned Batchelder <ned@nedbatchelder.com> - 2013-10-19 08:44 -0400
    Re: Error Testing Roy Smith <roy@panix.com> - 2013-10-19 08:57 -0400
      Re: Error Testing Chris Angelico <rosuav@gmail.com> - 2013-10-20 00:04 +1100
      Re: Error Testing Ned Batchelder <ned@nedbatchelder.com> - 2013-10-19 09:07 -0400
        Re: Error Testing Roy Smith <roy@panix.com> - 2013-10-19 09:09 -0400
      Re: Error Testing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-19 14:19 +0100
  Re: Error Testing Chris Angelico <rosuav@gmail.com> - 2013-10-20 00:01 +1100
  Re: Error Testing David Robinow <drobinow@gmail.com> - 2013-10-19 14:08 -0400
  Re: Error Testing Tim Chase <tim@thechases.com> - 2013-10-19 13:31 -0500
  Re: Error Testing Terry Reedy <tjreedy@udel.edu> - 2013-10-19 15:50 -0400
  What's wrong with Windows Command Prompt (was Re: Error Testing) Terry Reedy <tjreedy@udel.edu> - 2013-10-19 16:35 -0400
  Re: What's wrong with Windows Command Prompt (was Re: Error Testing) Chris Angelico <rosuav@gmail.com> - 2013-10-20 09:15 +1100
  Re: Error Testing Chris Angelico <rosuav@gmail.com> - 2013-10-20 09:20 +1100
  Re: What's wrong with Windows Command Prompt (was Re: Error Testing) David Robinow <drobinow@gmail.com> - 2013-10-21 15:55 -0400
  Re: What's wrong with Windows Command Prompt (was Re: Error Testing) Tim Chase <python.list@tim.thechases.com> - 2013-10-21 15:29 -0500

csiph-web