On 24/01/2015 01:50, Cameron Simpson wrote:
My intuition is that a function is costly (potentially) and that consulting an attribute is very cheap. I don't want to break such intuition.
It's not just your intuition, it's a fact. Function calls are costly, relative to attribute lookup that is, at least in cPython. I've no idea what the impact is in other implementations. I'd guess that 99% of the time 99% of Python programmers needn't worry about it.
-- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor