Back on topic [was [OT] Syntax highlighting]
steve at REMOVE-THIS-cybersource.com.au
Mon Sep 20 09:58:09 CEST 2010
On Mon, 20 Sep 2010 07:02:23 +0000, Seebs wrote:
> very new to Python, so I'm not 100% sure functions are a kind of an
> object, but I seem to recall they were.
Yes, functions are objects. *Everything* in Python is an object (apart
from statements, but they're not actually *things* in Python).
>>> def f():
... return f.x
>>> f.x = 2
>>> f.x = -1
For some interesting glimpse at how Python works, create a function f and
then look at dir(f).
More information about the Python-list