Re: Checking default arguments

2007-02-05 Thread Igor V. Rafienko
[ George Sakkis ] First of all, thanks to everyone who replied. [ ... ] > I don't know why you might want to distinguish between the two in > practice (the unique object idea mentioned in other posts should > handle most uses cases), but if you insist, here's one way to do it: There is no act

Re: Checking default arguments

2007-02-03 Thread George Sakkis
On Feb 2, 1:30 pm, [EMAIL PROTECTED] (Igor V. Rafienko) wrote: > Hi, > > I was wondering whether it was possible to find out which parameter > value is being used: the default argument or the user-supplied one. > That is: > > def foo(x, y="bar"): > # how to figure out whether the value of y is

Re: Checking default arguments

2007-02-02 Thread Ben Finney
[EMAIL PROTECTED] (Igor V. Rafienko) writes: > I was wondering whether it was possible to find out which parameter > value is being used: the default argument or the user-supplied one. > That is: > > def foo(x, y="bar"): > # how to figure out whether the value of y is > # the default argu

Re: Checking default arguments

2007-02-02 Thread Gabriel Genellina
En Fri, 02 Feb 2007 15:30:53 -0300, Igor V. Rafienko <[EMAIL PROTECTED]> escribió: >> I was wondering whether it was possible to find out which parameter > value is being used: the default argument or the user-supplied one. > That is: > > def foo(x, y="bar"): > # how to figure out whether th

Re: Checking default arguments

2007-02-02 Thread Steven Bethard
Igor V. Rafienko wrote: > I was wondering whether it was possible to find out which parameter > value is being used: the default argument or the user-supplied one. > That is: > > def foo(x, y="bar"): > # how to figure out whether the value of y is > # the default argument, or user-suppl

Re: Checking default arguments

2007-02-02 Thread Neil Cerutti
On 2007-02-02, Igor V. Rafienko <[EMAIL PROTECTED]> wrote: > Hi, > > I was wondering whether it was possible to find out which > parameter value is being used: the default argument or the > user-supplied one. That is: > > def foo(x, y="bar"): > # how to figure out whether the value of y is >

Checking default arguments

2007-02-02 Thread Igor V. Rafienko
Hi, I was wondering whether it was possible to find out which parameter value is being used: the default argument or the user-supplied one. That is: def foo(x, y="bar"): # how to figure out whether the value of y is # the default argument, or user-supplied? foo(1, "bar") => user-sup