From: Bill W. <wp...@gm...> - 2006-02-15 14:17:20
|
On 2/15/06, Silvio Arcangeli <nim...@ya...> wrote: > > Well, I just fixed the issue: > >>> a=3D1 > >>> def test(): > ... global a > ... print a > ... a=3D2 > ... > >>> test() > 1 > >>> a > 2 > >>> > > I didn't know about the "global" clause, to be used > when you mean to modify a global variable... > It's never too late to learn something new :) > > Silvio > Ain't that the truth :) This issue is addressed in the Python Programming FAQ (http://www.python.org/doc/faq/programming.html), questions 1.2.1 and 1.2.2. - Bill -- Bill Woodward wp...@sa... http://www.saifa.net "I have more trouble with D. L. Moody than with any other man I ever met." -- D. L. Moody s/D. L. Moody/Bill Woodward/g |