I'm under the impression that, unlike C++, Python has it's own garbage
collecting system so when you stop using i, i is trashed and no longer
worried about. I know that in languages like C++, you have to account
for variable tracking and removal yourself, but python is pretty nice
that way.

Brandon L. Harris

On Dec 18, 3:04 am, viktoras <[email protected]> wrote:
> hi,
> it's not really maya related, but got me curious:
>
>         for i in range(self.steps):
>             self.runRelaxStep()
>
> this piece of code is giving me "unused variable i" warning in my IDE
> (eclipse+pydev), which
> is kinda true - i don't use "i", but i must have it for for-loop to be
> valid statement.
> now it's not really a big deal, but is there any other language
> construct that does not require
> temporary variable for this kind of loop ("repeat X times")?
>
> --
> viktoraswww.neglostyti.com

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to