A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-June/004647.html below:

[Python-Dev] Re: stringobject question

[Python-Dev] Re: stringobject questionTrent Mick trentm@activestate.com
Tue, 13 Jun 2000 22:21:42 -0700
On Tue, Jun 13, 2000 at 10:53:58PM -0500, Al-Amerrho H. Amerin wrote:
> Is this a bug or a feature?:
> 
> Python 1.6a2 (#4, Jun  9 2000, 02:22:41)  [GCC 2.95.2 19991024
> (release)] on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
> 
> >>> ''.isdigit()
> 1
> >>> ''.isspace()
> 1
> 

Good point, maybe. The __docs__ say:

"S.isdigit() -> int\n\
\n\
Return 1 if there are only digit characters in S,\n\
0 otherwise.";


static char isspace__doc__[] =
"S.isspace() -> int\n\
\n\
Return 1 if there are only whitespace characters in S,\n\
0 otherwise.";


I am not an English language lawyer so I could see both interpretations from
the doc strings. I agree, that the result with a zero length string is
surprising. 


Hi All,
Which should it be? Sorry, if this has been covered.



Trent


-- 
Trent Mick
trentm@activestate.com



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4