[Numpy-discussion] Is a string a scalar type?

Charles R Harris charlesr.harris@gmail....
Sat Mar 24 20:23:48 CDT 2007

On 3/24/07, Robert Kern <robert.kern@gmail.com> wrote:
> Charles R Harris wrote:
> > In [10]: isscalar('hello world')
> > Out[10]: True
> I would say that, intrinsically, yes, strings are constructed as sequences
> of
> other things. However, essentially every use case I have for *testing*
> whether
> or not something is a sequence (or inversely, a scalar), I want strings to
> answer as "not a sequence".

I see


But apparently none of them test for a scalar number. That is a strange
functionality to be missing.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070324/b7368581/attachment-0001.html 

More information about the Numpy-discussion mailing list