gusa...@gmail.com writes:
> What is the appropriate definition for the following behavior in
> Python 2.7 (see code below).
>
> Both functions have assignment in it (like "x = ") so I assume, that
> x is a local variable in both functions.
It's a local variable in both functions because it's a fo
Hi,
On Tue, Dec 04, 2012 at 02:55:44PM +0400, gusa...@gmail.com wrote:
> What is the appropriate definition for the following behavior in Python 2.7
> (see code below).
It has something to do with mutability of lists and that Python passes
around references and not the actual objects.
>
> def f
On Tue, 04 Dec 2012 14:55:44 +0400, gusarer wrote:
> What is the appropriate definition for the following behavior in Python
> 2.7 (see code below).
> Both functions have assignment in it (like "x = ") so I assume, that x
> is a local variable in both functions.
Well, yes, but that's not why x is
Hi,
What is the appropriate definition for the following behavior in Python 2.7
(see code below).
Both functions have assignment in it (like "x = ") so I assume, that x is a
local variable in both functions.
Also I thought this rule doesn't depend on WHERE in this function we find
the assignment.