[Tutor] object orientation

Bill Mill bill.mill at gmail.com
Mon Nov 15 07:41:17 CET 2004


Christian,

A little creative googling brought up Andrew Kuchling on the topic:

http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/91470f975bc85485/b725ce946cd1584c?_done=%2Fgroup%2Fcomp.lang.python%2Fsearch%3Fgroup%3Dcomp.lang.python%26q%3D%22len(x)%22+%22x.len()%22%26qt_g%3D1%26searchnow%3DSearch+this+group%26&_doneTitle=Back+to+Search&&d#b725ce946cd1584c

It gets asked on the newsgroup all the time, but basically he gives
the answer minus all the bull you'll hear on said newsgroup
discussions.

Peace
Bill Mill
bill.mill at gmail.com


On Sun, 14 Nov 2004 21:40:03 -0800, Christian Meesters
<cmeesters at ucdavis.edu> 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