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

David LeBlanc whisper at oz.net
Wed May 22 15:57:35 EDT 2002


If item 6.6 in the FAQ is any indication, it's a bit out of date...

I thought the reason for such built-in functions like len was from an early
point in Python's development when there where no classes?

Isn't there a move afoot to do away with most built-ins? I personally prefer
str.len() to len(str).

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Jarno J Virtanen
> Sent: Wednesday, May 22, 2002 12:02
> To: python-list at python.org
> Subject: Re: Why does Python mix OO concepts and non OO concepts for
> operation s on basic types?
>
>
> Wed, 22 May 2002 13:13:06 -0500 Michael Bauers wrote:
> >
> > Why do you say x = []; x.append('a'), but get the length with len(a) ?
> >
> > Is there a reason for this sort of inconsistency?
>
> why not check the FAQ?
>
> 	http://www.python.org/cgi-bin/faqw.py?req=all#6.5
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list