Complaint Dept: My shoes!

Moshe Zadka moshez at math.huji.ac.il
Fri Apr 14 13:27:29 EDT 2000


On Thu, 13 Apr 2000 musingattheruins at my-deja.com wrote:

> If shoe is None then len(shoe) raises an exception.  Would be nice if
> len(None) was 0 and NOT raise an exeption.

Huh? Why not have len(None) 4? Or -1?
If you want an empty string, use an empty string. The good thing
about None is that it supports so few operations, functions not expecting
it would break right away, instead of having a hidden bugs.

in-the-face-of-ambiguity-refuse-to-guess-ly y'rs, Z.





More information about the Python-list mailing list