1 Mar 2004 01:11
[Fwd: Re: what is an object?]
Gregor Lingl <glingl <at> aon.at>
2004-03-01 00:11:11 GMT
2004-03-01 00:11:11 GMT
Betreff: Re: [Tutor] what is an object? Datum: Sun, 29 Feb 2004 07:36:08 -0800 (PST) Von: Martin Gandhi <bioinfo_python <at> yahoo.com> An: Gregor Lingl <glingl <at> aon.at> Hi Gregor, Thanks for your explnation. It was clear. However, I have one simple question that I often stumbled upon. I have read Guido's tutorial and also learning pyton and I see that every where. What exactly both semantic and logical meaning of "callable". In your explantion you mentioned that instance attributed are not "callable" Sorry for asking a lame question. It will really make a difference to understand better, though.. Thanks MG *//* _______________________________________________ Tutor maillist - Tutor <at> python.org http://mail.python.org/mailman/listinfo/tutor
if you can call it using the
syntax
f()
or
f(arg1, args, ...)
Semantically than means that f contains some code which is executed
when f is called.
There is a built in function callable, which you can use to determine if
some object is callable or not:
>>> callable(3)
False
>>> callable( [1,2,3] )
False
>>> callable(len) # built-in function
True
RSS Feed