Fredrik Lundh wrote:
> Avi Kak wrote:
>> Suppose I write a function that I want to be called
>> with ONLY keyword argumnts, how do I raise an
>> exception should the function get called with
>> what look like position-specfic arguments?
>
> here's one way to do it:
>
def func(*args, **kw):
>
Andrew Gwozdziewycz wrote:
> While we're at it... Can someone point me to either an old post, or
> documentation about tuple expansion with * ? I recently saw it used
> and was shocked as i had no clue what it really did. I didn't know it
> could be used outside of function definitions.
the refer
Avi Kak wrote:
> Hello:
>
>Suppose I write a function that I want to be called
>with ONLY keyword argumnts, how do I raise an
> exception should the function get called with
> what look like position-specfic arguments?
>
> Any help would be appreciated.
Say you want the signature
While we're at it... Can someone point me to either an old post, or
documentation about tuple expansion with * ? I recently saw it used
and was shocked as i had no clue what it really did. I didn't know it
could be used outside of function definitions.
On 2/13/06, Fredrik Lundh <[EMAIL PROTECTED]>
Avi Kak wrote:
> Suppose I write a function that I want to be called
> with ONLY keyword argumnts, how do I raise an
> exception should the function get called with
> what look like position-specfic arguments?
here's one way to do it:
>>> def func(*args, **kw):
... def myrealfunc(a=1, b=2, c
On Mon, 2006-02-13 at 14:13, Avi Kak wrote:
> Hello:
>
>Suppose I write a function that I want to be called
>with ONLY keyword argumnts, how do I raise an
> exception should the function get called with
> what look like position-specfic arguments?
>
> Any help would be appreciated.