Question on class member in python

Alex Martelli aleaxit at yahoo.com
Tue Oct 18 04:54:42 EDT 2005


Johnny Lee <johnnyandfiona at hotmail.com> wrote:

> But I still wonder what's the difference between the A().getMember and
> A().member besides the style

Without parentheses after it, getMember is a method.  The difference
between a method object and an integer object (which is what member
itself is in your example) are many indeed, so your question is very
strange.  You cannot call an integer, you cannot divide methods, etc.


Alex



More information about the Python-list mailing list