H Heshan, Can you explain why you'd want to do this?
You can write def f(): print f.a f.a = 4 f() But I can't see you would want to do something like that. Maybe if you give a use case. Someone can come up with a solution. Regards, Sidharth On Apr 3, 2008, at 2:03 PM, Heshan Suriyaarachchi wrote: > Hi > What I meant was a situation like this. > > In javascript I'm used to associating metadata with a function as > follows. > > foo.bar = "foobar"; > function foo(){ > } > > What is the normal python practice to do this kind of a thing. > > Your help is very much appreciated. > > Thanks, > Heshan Suriyaarachchi > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers