"Gert Cuykens" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| def obj():
| return {'data':'hello',
| 'add':add(v)}
v is undefined
| def add(v):
| data=data+v
data is undefined
| if __name__ == '__main__':
| test=obj()
| test.add('world')
test.add is undefined
| print test.data
test.data is undefined
| I don't know why but i have one of does none class c programing style
| moods again. I was wondering if the following was possible without
| using a class ?
I presume you meant 'foregoing' instead of 'following'. You can do
something similar with nested functions.
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list