Re: Is this a correct way to generate an exception when getting a wrong parameter

2015-08-12 Thread Bernd Waterkamp
Mark Lawrence schrieb: > The wonderful http://docopt.org/ makes this type of thing a piece of > cake. I believe there's a newer library that's equivalent in > functionality to docopt but I can never remember the name of it, anybody? Never used it, but "Click" is another choice: http://click.po

Re: Is this a correct way to generate an exception when getting a wrong parameter

2015-08-12 Thread Mark Lawrence
On 12/08/2015 10:33, Peter Otten wrote: Cecil Westerhof wrote: I have: accepted_params = { 'pcpu', 'rss', 'size', 'time', 'vsize', }

Re: Is this a correct way to generate an exception when getting a wrong parameter

2015-08-12 Thread Peter Otten
Cecil Westerhof wrote: > I have: > > accepted_params = { > 'pcpu', > 'rss', > 'size', > 'time', > 'vsize', > } > > > Later I us

Re: Is this a correct way to generate an exception when getting a wrong parameter

2015-08-12 Thread Chris Angelico
On Wed, Aug 12, 2015 at 7:06 PM, Cecil Westerhof wrote: > I have: > > accepted_params = { > 'pcpu', > 'rss', > 'size', > 'time', > 'vsize', > } > ===

Is this a correct way to generate an exception when getting a wrong parameter

2015-08-12 Thread Cecil Westerhof
I have: accepted_params = { 'pcpu', 'rss', 'size', 'time', 'vsize', } Later I use: =