On Tue, Feb 17, 2009 at 12:16 AM, wesley chun <wes...@gmail.com> wrote:
> marc: i will slightly disagree with you with regards to strftime *not* > being an attribute. it *is* an attribute, just not a *data > attribute*... i call it a "function attribute," but that's just > terminology. any time you have an object x with an attribute y, the > fact that you can issue x.y means that y is indeed an attribute of x. > if it's a data attribute, you access it with x.y. if it's a function > attribute, i.e., a method, you also access it with x.y, esp. if you > want to pass the function object around, and finally, if you actually > want to *execute* it *and* it's a method, then you add the parens, > x.y(). > Which follows from the fact that in Python, functions are objects too. However, in the context of the OP's question, I think that if he referenced strftime with no parentheses the result would NOT be what he expected or intended; the distinction between methods and what you call "data attributes" can be an important one. Point taken, though. -- www.fsrtechnologies.com
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor