[SciPy-dev] stats confusion

Pauli Virtanen pav at iki.fi
Wed Jun 17 09:43:09 EDT 2009


Wed, 17 Jun 2009 09:37:10 -0400, josef.pktd kirjoitti:
[clip]
> Positional arguments cannot be called as keyword arguments, that is
> standard python.
> (on the other hand keyword arguments can be called also as positional
> arguments.

Positional arguments can usually be called as keyword arguments in 
standard Python.

def foo(a):
    print a

foo(a=5)

> the signature and help has standard notation:
> 
> eg. signature:  np.maximum(x1, x2[, out])
> 
>>>> np.maximum(x1=[5], x2=[6])
> Traceback (most recent call last):
> TypeError: 'x2' is an invalid keyword to maximum

The only exception are functions provided by C extension modules, and 
functions that use *args.

-- 
Pauli Virtanen




More information about the SciPy-Dev mailing list