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


Groups > comp.lang.python > #55109

Re: Python Unit Tests

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.024
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.06; 'tries': 0.07; '34,': 0.09; 'runs': 0.10; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'iterable': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'typeerror:': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'header:User-Agent:1': 0.23; 'error': 0.23; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'file': 0.32; 'says': 0.33; '(most': 0.33; 'guess': 0.33; 'but': 0.35; 'next': 0.36; 'starting': 0.37; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'email addr:gmail.com': 0.63; 'within': 0.65; 'hang': 0.67; 'header:Reply-To:1': 0.67; 'reply- to:no real name:2**0': 0.71; 'lol,': 0.84; 'reply- to:addr:python.org': 0.84
X-CM-Score 0.00
X-CNFS-Analysis v=2.1 cv=bKAvfpOZ c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=LqG8EI-UCiYA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=uSNYBCnnyFYA:10 a=pGLkceISAAAA:8 a=DSywA_Lnd82BTFaLdBgA:9 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10
X-AUTH mrabarnett:2500
Date Mon, 30 Sep 2013 21:08:16 +0100
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Python Unit Tests
References <bb6482de-ce4e-4dd2-845c-f71008123c03@googlegroups.com> <64c1fa97-ace1-4fee-83b0-cf5fd7230e82@googlegroups.com>
In-Reply-To <64c1fa97-ace1-4fee-83b0-cf5fd7230e82@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To python-list@python.org
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.503.1380571692.18130.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1380571692 news.xs4all.nl 15973 [2001:888:2000:d::a6]:55517
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:55109

Show key headers only | View raw


On 30/09/2013 20:54, melwin9@gmail.com wrote:
> Lol, im starting to get the hang out of, onto the next hurdle, i looked up the error and it says the data is none?
>
> Traceback (most recent call last):
>    File "guess.py", line 34, in <module>
>      main(random.randint(1, 10))
>    File "guess.py", line 27, in main
>      guess, tries = getguess(target, allowed)
> TypeError: 'NoneType' object is not iterable
>
[snip]
Look at 'getguess'.

If the user guess correctly within the number of allowed attempts, the
function returns (guess, tries), but what if the user runs out of
attempts?

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


Thread

Python Unit Tests melwin9@gmail.com - 2013-09-27 21:52 -0700
  Re: Python Unit Tests Dave Angel <davea@davea.name> - 2013-09-28 06:11 +0000
  Re: Python Unit Tests Terry Reedy <tjreedy@udel.edu> - 2013-09-28 14:47 -0400
    Re: Python Unit Tests melwin9@gmail.com - 2013-09-29 18:46 -0700
      Re: Python Unit Tests Steven D'Aprano <steve@pearwood.info> - 2013-09-30 02:55 +0000
        Re: Python Unit Tests melwin9@gmail.com - 2013-09-29 21:19 -0700
          Re: Python Unit Tests Terry Reedy <tjreedy@udel.edu> - 2013-09-30 02:08 -0400
  Re: Python Unit Tests melwin9@gmail.com - 2013-09-30 12:54 -0700
    Re: Python Unit Tests MRAB <python@mrabarnett.plus.com> - 2013-09-30 21:08 +0100
    Re: Python Unit Tests Dave Angel <davea@davea.name> - 2013-09-30 20:20 +0000
    Re: Python Unit Tests Terry Reedy <tjreedy@udel.edu> - 2013-09-30 20:06 -0400

csiph-web