On 27 December 2012 20:47, Joseph L. Casale wrote:
>> Don't use kwargs for this. List out the arguments in the function
>> spec and give the optional ones reasonable defaults.
>
>> I only use kwargs myself when the set of possible arguments is dynamic
>> or unknown.
>
> Gotch ya, but when the inp
On Thu, Dec 27, 2012 at 1:47 PM, Joseph L. Casale
wrote:
>> Don't use kwargs for this. List out the arguments in the function
>> spec and give the optional ones reasonable defaults.
>
>> I only use kwargs myself when the set of possible arguments is dynamic
>> or unknown.
>
> Gotch ya, but when t
> Don't use kwargs for this. List out the arguments in the function
> spec and give the optional ones reasonable defaults.
> I only use kwargs myself when the set of possible arguments is dynamic
> or unknown.
Gotch ya, but when the inputs to some keywords are similar, if the function is
called
On Thu, Dec 27, 2012 at 1:16 PM, Joseph L. Casale
wrote:
> When you use optional named arguments in a function, how do you deal with with
> the incorrect assignment when only some args are supplied?
>
> If I do something like:
>
> def my_func(self, **kwargs):
>
> then handle the test cases wit
You need to define a function same following definition:
def myfunc(*arglist):
yourbody
calling function:
myfunc("it's first argument","It's second argument","It's thr argument")
On Tue, 2009-12-01 at 10:15 +0200, Nadav Chernin wrote:
> Hello, all
>
>
>
> I need to know dynamically
On Tue, Dec 1, 2009 at 12:15 AM, Nadav Chernin wrote:
> Hello, all
>
> I need to know dynamically parameters of any function (prototype).
>
> Is there some way to get it?
The `inspect` module:
http://docs.python.org/library/inspect.html#inspect.getargspec
http://docs.python.org/library/inspect.h