Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Convert '165.0' to int Date: Mon, 25 Jul 2011 12:04:49 +1200 Lines: 14 Message-ID: <993q91FebkU2@mid.individual.net> References: <4e281f97$0$16404$426a74cc@news.free.fr> <4230ed8b-5173-4408-938f-3777dcd60588@t7g2000vbv.googlegroups.com> <3d6b3ab4-6682-4e33-ab03-098d2f82c20d@o18g2000yqm.googlegroups.com> <58cdafad-e1ea-4774-984f-aa13cf2a9ef1@fq4g2000vbb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net /X3JyrgYzQt+is8oeTp4YwDLTJ5IR9ZgSnoCfwNXxUQQs3EGii Cancel-Lock: sha1:uoqUf+FpgJZl/TH2yzAJBZ3J0w0= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <58cdafad-e1ea-4774-984f-aa13cf2a9ef1@fq4g2000vbb.googlegroups.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10233 Frank Millman wrote: > I know I am flogging a dead horse here, but IMHO, '165', '165.', > '165.0', and '165.00' are all valid string representations of the > integer 165.[1] > > Therefore, for practical purposes, it would not be wrong for python's > 'int' function to accept these without complaining. How far would you go with that? Would you also accept '1.65e2' as a valid representation of the integer 165? -- Greg