I have a little problem that look something like this:

Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class test: pass
...
>>> test.a = 1
>>> test.b = 2
>>> for x in [test.a,test.b]:
...   x = x + 1
...
>>> print test.a
1
>>> print test.b
2
>>>

However, what I am after is a way to increment the variables in the list,
e.q. I want test.a to be 2 and test.b to be 3.

Is there a way of doing this?

Cheers
   Tommy

[EMAIL PROTECTED]
http://homepage.mac.com/tgrav/
------------------------------------------------------------
"Any intelligent fool can make things bigger,
more complex, and more violent. It takes a
touch of genius -- and a lot of courage -- to
move in the opposite direction"
                                                 -- Albert Einstein




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to