RE: [python] pass the name of args

2010-06-04 Thread jyoung79
Would vars() help? Check out this link: http://www.daniweb.com/forums/thread134555.html Jay -- > def myDef(x) > doSomething x > result = x. > return coolThings > - > > WhatYourName = ('python','is','cool') > > myDef(WhatYourName) > > so

Re: [python] pass the name of args

2010-06-04 Thread Terry Reedy
On 6/4/2010 7:32 AM, macm wrote: A few types of objects have definition names (.__name__ attribute). All have 0 to many namespace names. If you want to pass an attribute name, pass it -- as a string. def myDef(x) doSomething x result = x. return coolThings def f

Re: [python] pass the name of args

2010-06-04 Thread Chris Rebert
On Fri, Jun 4, 2010 at 4:32 AM, macm wrote: > Hi Folks > > def myDef(x) >        doSomething x >        result = x. >        return coolThings > - > > WhatYourName = ('python','is','cool') > > myDef(WhatYourName) > > so what I am looking for in myDef > >        

[python] pass the name of args

2010-06-04 Thread macm
Hi Folks def myDef(x) doSomething x result = x. return coolThings - WhatYourName = ('python','is','cool') myDef(WhatYourName) so what I am looking for in myDef result = WhatYourName -- again :