[Tutor] object orientation

Kent Johnson kent37 at tds.net
Mon Nov 15 12:06:25 CET 2004


There was recently a long thread on this topic on comp.lang.python. Many 
people argued that this is a desirable feature of python, not an 
historical accident, because it lets the runtime try different methods 
to resolve an operation. This post by Alex Martelli spells out the 
argument at length: 
http://groups.google.com/groups?hl=en&lr=&c2coff=1&selm=1gm05gb.1251x8o3h0barN%25aleaxit%40yahoo.com&rnum=6

Kent


Christian Meesters wrote:
> Hi
> 
> These days I was reading a discussion between "Ruby-people" and 
> "Python-people" (us) on pros and cons of each language. Such discussions 
> aren't very meaningful, of course, but sometimes interesting. One of the 
> arguments was about the realization of the OO-approach in the languages. 
> And this leads me to my question: Though I like the Python syntax and 
> actually prefer it above Ruby's, I wanted to know why we write len(x) 
> instead of x.len() (x being a string for instance). Does anybody know an 
> essay / link about why this approach was chosen? It makes sense within 
> Python, of course, but for now I'm merely interested in the history. My 
> own screenings of the web didn't bring up anything useful about this topic.
> 
> Thanks in advance,
> Cheers
> Christian
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 


More information about the Tutor mailing list