Re: [Tutor] Turning kwargs into scalars

2005-11-01 Thread bob
At 08:52 PM 10/31/2005, Steve Bergman wrote: >Say I have a function: >def f(self, **kwargs) : FWIW you don't have a function at this point. You have a def statement which must be followed by at least one indented statement, which in turn must be executed. Then you have a function. >and I want t

Re: [Tutor] Turning kwargs into scalars

2005-10-31 Thread Danny Yoo
On Mon, 31 Oct 2005, Steve Bergman wrote: > Say I have a function: > > def f(self, **kwargs) : > > and I want to take the key/value pairs and create a set of variables > with the names of the keys. > > For example, if I say: > > f(x=5, y=2) > > I want to create local variables 'x' and 'y' in the

[Tutor] Turning kwargs into scalars

2005-10-31 Thread Steve Bergman
Say I have a function: def f(self, **kwargs) : and I want to take the key/value pairs and create a set of variables with the names of the keys. For example, if I say: f(x=5, y=2) I want to create local variables 'x' and 'y' in the function, with values of 5 and 2 respectively. How could I d