Complaint Dept: My shoes!

Michael Hudson mwh21 at cam.ac.uk
Fri Apr 14 10:13:58 EDT 2000


aflinsch <avflinsch at att.net> writes:

> 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.
> > 
> 
> I think I would prefer it if len(None) returned None. Makes a bit more
> sense to me having an unsized object return None, rather than zero.

I would prefer that len(ob) raised an exception whenever it was passed
an `ob' that didn't have a well defined length (like None).

Second guessing what would be most helpful to the programmer smacks of
another p-language.

Is "ob and len(ob) or 0" too hard to spell?

always-willing-to-back-the-status-quo-in-cases-like-these-ly y'rs
m.

-- 
  On the other hand,  the following areas are subject to boycott
  in reaction to the rampant impurity of design or execution, as
  determined after a period of study, in no particular order: 
    ...                            http://www.naggum.no/profile.html



More information about the Python-list mailing list