Favorite non-python language trick?

Torsten Bronger bronger at physik.rwth-aachen.de
Fri Jun 24 15:50:29 EDT 2005


Hallöchen!

Jeffrey Maitland <jeff.maitland at gmail.com> writes:

> [...]
>
> {
> for(int i = 0; i < 100; i++){
>  //do stuff
> }
> } 
>
> wrapping the for loop in { } makes the i a local variable

It's local anyway.

> and then you can use it again in the code if not you will get a
> variable already defined error.

Only in compilers created by this infamous company.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus



More information about the Python-list mailing list