def obj()

Gert Cuykens gert.cuykens at gmail.com
Thu Feb 8 16:49:26 EST 2007


def obj():
    return {'data':'hello',
                'add':add(v)}

def add(v):
    data=data+v

if  __name__ == '__main__':
    test=obj()
    test.add('world')
    print test.data

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 ?



More information about the Python-list mailing list