Re: Tracing variable scope (local vs. global)

2009-12-01 Thread Terry Reedy
Manuel Graune wrote: Hello, consider the following piece of code: a=1 b=2 def foo(c): b=3 return a + b + c In this case, when calling "foo", "a" will take the global value, "b" will take the local value and "c" will take the value assigned when calling the function. Since I consider

Re: Tracing variable scope (local vs. global)

2009-12-01 Thread Diez B. Roggisch
Manuel Graune schrieb: Hello, consider the following piece of code: a=1 b=2 def foo(c): b=3 return a + b + c In this case, when calling "foo", "a" will take the global value, "b" will take the local value and "c" will take the value assigned when calling the function. Since I conside

Re: Tracing variable scope (local vs. global)

2009-12-01 Thread Lie Ryan
On 12/2/2009 9:02 AM, Manuel Graune wrote: Hello, consider the following piece of code: a=1 b=2 def foo(c): b=3 return a + b + c In this case, when calling "foo", "a" will take the global value, "b" will take the local value and "c" will take the value assigned when calling the fun

Tracing variable scope (local vs. global)

2009-12-01 Thread Manuel Graune
Hello, consider the following piece of code: a=1 b=2 def foo(c): b=3 return a + b + c In this case, when calling "foo", "a" will take the global value, "b" will take the local value and "c" will take the value assigned when calling the function. Since I consider this behaviour a possi