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


Groups > comp.lang.python > #20205

Re: How can I catch misnamed variables?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.058
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '22:06,': 0.16; 'compileall': 0.16; 'header :In-Reply-To:1': 0.22; 'incorrect': 0.23; 'tests': 0.25; 'module': 0.26; 'code': 0.26; "i'm": 0.28; 'coverage.': 0.30; 'functional': 0.31; 'subject:?': 0.31; 'does': 0.32; 'there': 0.33; 'header :User-Agent:1': 0.33; 'header:X-Complaints-To:1': 0.34; 'to:addr :python-list': 0.35; 'subject:How': 0.35; 'subject:can': 0.35; 'received:org': 0.36; 'variables': 0.37; 'run': 0.37; 'but': 0.37; 'using': 0.37; 'some': 0.38; 'problems': 0.38; 'received:de': 0.39; 'received:78': 0.40; 'to:addr:python.org': 0.40; 'john': 0.61; 'your': 0.61; 'high': 0.66; 'quality': 0.75; '100%': 0.82
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Christian Heimes <lists@cheimes.de>
Subject Re: How can I catch misnamed variables?
Date Sat, 11 Feb 2012 00:21:11 +0100
References <jh40ti$t3i$1@reader1.panix.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host f048196031.adsl.alicedsl.de
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0
In-Reply-To <jh40ti$t3i$1@reader1.panix.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5688.1328916091.27778.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328916091 news.xs4all.nl 6873 [2001:888:2000:d::a6]:56896
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20205

Show key headers only | View raw


Am 10.02.2012 22:06, schrieb John Gordon:
> Is there an automated way to catch errors like these?  I'm using the
> compileall module to build my program and it does catch some errors
> such as incorrect indentation, but not errors like the above.

Write unit tests and use coverage to aim for 100% code and branch coverage.

If you want to write high quality code and avoid problems like misnamed
variables then you have to write unit tests and functional tests for
your program. I'm well aware that it's hard and requires time. But in
the long run it will *save* lots of time.

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


Thread

How can I catch misnamed variables? John Gordon <gordon@panix.com> - 2012-02-10 21:06 +0000
  Re: How can I catch misnamed variables? Arnaud Delobelle <arnodel@gmail.com> - 2012-02-10 21:17 +0000
  Re: How can I catch misnamed variables? Kev Dwyer <kevin.p.dwyer@gmail.com> - 2012-02-10 21:22 +0000
  Re: How can I catch misnamed variables? Ben Finney <ben+python@benfinney.id.au> - 2012-02-11 08:26 +1100
    OT (waaaayyyyyyyyy off-topic) [was Re: How can I catch misnamed variables?] Ethan Furman <ethan@stoneleaf.us> - 2012-02-10 13:56 -0800
      Re: OT (waaaayyyyyyyyy off-topic) Ben Finney <ben+python@benfinney.id.au> - 2012-02-11 09:45 +1100
  Re: How can I catch misnamed variables? Christian Heimes <lists@cheimes.de> - 2012-02-11 00:21 +0100

csiph-web