Sorry about that kent. I just realized I emailed you directly.
Ezra On 4/24/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
ammar azif wrote: > Something in python disturbs me , > > when i write a for loop, > > i am able to access the variable declared in that loop after the loop > finishes which i am not able to do in languages like c/c++ or java. Is > it different in python? Yes, it is different. In Python a block is not a scope. Names bound within the block, including the loop variable, are accessible outside the block. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
-- Ezra Taylor
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor