Coding style

Jorge Godoy jgodoy at gmail.com
Tue Jul 18 21:54:57 EDT 2006


"Carl Banks" <pavlovevidence at gmail.com> writes:

> Well, I certainly can agree with that, except for the last point. :)  I
> certainly wouldn't want to keep that unfortunate behavior around just I
> have something to use as an argument using len to test emptiness.

On the other hand, having this behavior makes it so simple to deal with some
algorithms because on doesn't need to know if the given object does or does
not support len()...  

Having to test if something is of certain type then choosing what kind of test
to apply is not something I'd like to have to do all the time.

-- 
Jorge Godoy      <jgodoy at gmail.com>



More information about the Python-list mailing list