Path: csiph.com!usenet.pasdenom.info!aioe.org!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'subject:Error': 0.07; 'converted': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'red,': 0.16; 'roy': 0.16; 'wrote:': 0.18; 'value.': 0.19; 'entered': 0.20; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'integer': 0.24; 'string,': 0.24; 'first,': 0.26; 'shown': 0.26; 'values': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'really,': 0.31; 'says': 0.33; 'url:python': 0.33; 'but': 0.35; 'url:org': 0.36; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'most': 0.60; 'url:3': 0.61; "you're": 0.61; 'here': 0.66; 'smith': 0.68; 'goal': 0.75; 'article': 0.77; 'batchelder': 0.84; 'subject:Testing': 0.84; 'scott': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Error Testing Date: Sat, 19 Oct 2013 14:19:09 +0100 References: <33549834-2f27-47f3-abea-eb3486909dec@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-19-253.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382188769 news.xs4all.nl 15950 [2001:888:2000:d::a6]:34309 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57101 On 19/10/2013 13:57, Roy Smith wrote: > On 10/19/13 8:23 AM, Scott Novinger wrote: >>> My goal is to make sure that the value entered for the radius is an integer >>> value. > > In article , > Ned Batchelder wrote: > >> First, radius is the result of input(), so it is >> always a string, never an int. > > input() returns ints or floats for values which can be converted to > those. I suspect you're thinking of raw_input()? > Really, not what it says here http://docs.python.org/3/library/functions.html#input and shown by the following? In [5]: a=input() 12345 In [6]: a Out[6]: '12345' In [7]: type(a) Out[7]: builtins.str -- Roses are red, Violets are blue, Most poems rhyme, But this one doesn't. Mark Lawrence