len() should always return something

Joshua Kugler joshua at joshuakugler.com
Mon Jul 27 15:09:47 EDT 2009


Dr. Phillip M. Feldman wrote:

> 
> "As far as I know, there is no programming language which treats scalars
> like ints as if they were
> vectors of length 1"
> 
> Actually, Matlab does:
> 
>>> length(5)
> ans =
>      1
>>> 

Oddly enough, so does Perl:

$ print length(44)
2

(that's in the Zoidberg shell)

j





More information about the Python-list mailing list