Why does Python mix OO concepts and non OO concepts for operation s on basic types?

holger krekel pyth at devel.trillke.net
Mon Jun 10 21:41:34 EDT 2002


Don Garrett wrote:
> Hans Nowak wrote:
> > Besides, while Python is object-oriented, that isn't the only
> > paradigm in the language. People coming from a functional
> > background may find the len() function more natural than a
> > method.
> > 
> > YMMV,
> > 
> 
>    That's one thing I don't get. Why wasn't len() added as a member to the 
> various types during the recent rework that added so many other members to the 
> native types?

maybe duplicating '__len__' as 'len' is too much, well, duplication?

    holger





More information about the Python-list mailing list