Excerpts from Thomas L. Shinnick's message of Sun Jun 26 14:53:21 -0400 2011:
> See reference manual section 7.6 "Function definitions" under the
> discussion subtitle "Default parameter values are evaluated when the
> function definition is executed. "
>
> http://docs.python.org/refer
On Sun, Jun 26, 2011 at 11:28 AM, Marc Aymerich wrote:
> Hi,
> I'm trying to define a function that has an optional parameter which
> should be an empty list whenever it isn't given. However, it takes as
> value the same value as the last time the function was executed. What
> is the reason of thi
At 01:39 PM 6/26/2011, Shashank Singh wrote:
On Sun, Jun 26, 2011 at 11:58 PM, Marc Aymerich wrote:
> Hi,
> I'm trying to define a function that has an optional parameter which
> should be an empty list whenever it isn't given. However, it takes as
> value the same value as the last time the fun
On 6/26/2011 2:28 PM, Marc Aymerich wrote:
Hi,
I'm trying to define a function that has an optional parameter which
should be an empty list whenever it isn't given. However, it takes as
value the same value as the last time the function was executed. What
is the reason of this behaviour? How does
On Sun, Jun 26, 2011 at 7:28 PM, Marc Aymerich wrote:
> Hi,
> I'm trying to define a function that has an optional parameter which
> should be an empty list whenever it isn't given. However, it takes as
> value the same value as the last time the function was executed. What
> is the reason of this
Excerpts from Marc Aymerich's message of Sun Jun 26 14:28:30 -0400 2011:
> Hi,
> I'm trying to define a function that has an optional parameter which
> should be an empty list whenever it isn't given. However, it takes as
> value the same value as the last time the function was executed. What
> is
On Sun, Jun 26, 2011 at 11:58 PM, Marc Aymerich wrote:
> Hi,
> I'm trying to define a function that has an optional parameter which
> should be an empty list whenever it isn't given. However, it takes as
> value the same value as the last time the function was executed. What
> is the reason of thi
Hi,
I'm trying to define a function that has an optional parameter which
should be an empty list whenever it isn't given. However, it takes as
value the same value as the last time the function was executed. What
is the reason of this behaviour? How does python deal with default
values (i.e. when a