The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.python
From: Dave Hansen <i...@hotmail.com>
Date: Wed, 21 Dec 2005 17:17:16 -0600
Local: Wed, Dec 21 2005 6:17 pm
Subject: Re: How to check if a string "is" an int?
On 21 Dec 2005 14:36:32 -0800 in comp.lang.python, Paul Rubin
<http://phr...@NOSPAM.invalid> wrote: Following your logic to its conclusion, had the name isdigits been >There is a third choice which is the natural and obvious one: have the >function do what its name indicates. Return true if the arg is a >digit and false otherwise. If iterating over the whole string is >useful (which it may be), then the function should have been named >differently, like .isdigits instead of .isdigit. chosen, '1'.isdigits() should return False. It's only one digit, not more than one, as the plural would imply. I, for one, don't see any utility in the dichotomy. We only need >FWIW, I've usually tested for digit strings with re.match. It never expressions and problems... Not that I agree with it, but ISTM that regular expressions are vast overkill for this problem. Regards, -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||