Re: [Tutor] understanding **kwargs syntax

2011-09-08 Thread Alan Gauld
On 08/09/11 11:10, John wrote: Following up on this... Why does pylint seem to think it is a bad idea? Description ResourcePathLocationType ID:W0142 plot_ts_array_split_x: Used * or ** magic tsplot.py /research.plot line 299PyLint Problem I assume beca

Re: [Tutor] understanding **kwargs syntax

2011-09-08 Thread Peter Otten
John wrote: > Following up on this... > > Why does pylint seem to think it is a bad idea? > > Description ResourcePathLocationType > ID:W0142 plot_ts_array_split_x: Used * or ** > magic tsplot.py /research.plot line 299PyLint Problem I would guess it's a rea

Re: [Tutor] understanding **kwargs syntax

2011-09-08 Thread John
Following up on this... Why does pylint seem to think it is a bad idea? Description ResourcePathLocationType ID:W0142 plot_ts_array_split_x: Used * or ** magic tsplot.py /research.plot line 299PyLint Problem Thanks, john On Thu, Aug 25, 2011 at 10:44 AM

Re: [Tutor] understanding **kwargs syntax

2011-08-25 Thread Alan Gauld
On 25/08/11 09:27, John wrote: Just a quick question, is it wrong to use the *args and **kwargs ( the latter in particular) when DEFINING a function? No, in fact it's essential if you don't know in advance what arguments are going to be passed to the function. This is very common if you are

[Tutor] understanding **kwargs syntax

2011-08-25 Thread John
Just a quick question, is it wrong to use the *args and **kwargs ( the latter in particular) when DEFINING a function? def fest(**kwargs): """ a function test """ keys = sorted(kwargs.keys()) print("You provided {0} keywords::\n".format(len(keys))) for kw in keys: print("