On Fri, May 10, 2013 at 3:19 PM, Jim Mooney <cybervigila...@gmail.com> wrote:
> If I'm using a variable-dependent range in a for loop, is Python smart
> enough to figure the variable once so I don't have to hoist it up?

Hi Jim,


The gritty details say "yes":

    http://docs.python.org/2/reference/compound_stmts.html#the-for-statement

when it says: "The expression list is evaluated once; it should yield
an iterable object."
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to