[Python-3000] Special methods and interface-based type system

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Nov 23 04:23:55 CET 2006


Guido van Rossum wrote:
> I chose len(x) over x.len() for HCI reasons
> 
> (a) For some operations, prefix notation just reads better than
> postfix
> (b) When I read code that says len(x) I *know* that it is asking for
> the length of something.

Just as a matter of interest, how far do you
think these principles apply or don't apply
to more recent things like iter.next() that
don't follow this pattern?

--
Greg


More information about the Python-3000 mailing list