Hendrik van Rooyen
mail at microcorp.co.za
Sat Nov 3 07:36:24 CET 2007
"Bruno Desthuilliers" wrote:
>functions are *not* methods of their module.
Now I am confused - if I write:
result = foo.bar(param)
Then if foo is a class, we probably all agree that bar is
a method of foo.
But the same syntax would work if I had imported some
module as foo.
So what's the difference ? Why can't bar be called a method
of foo, or is it merely a convention that classes have
methods and modules have functions?
Note that I am purposely refraining from mentioning a module
that has a class that has a method.
More information about the Python-list