[Python-Dev] Re: listcomps vs. for loops
Sean Legassick
sean at datamage.net
Wed Oct 22 22:54:32 EDT 2003
In message
<338366A6D2E2CA4C9DAEAE652E12A1DECFF239 at au3010avexu1.global.avaya.com>,
"Delaney, Timothy C (Timothy)"
>Note the winking smiley above :) Although I do find the scope limiting in:
>
> for (int i=0; i < 10; ++i)
> {
> }
>
>to be a nice feature of C++ (good god - did I just say that?) and hate
>that the implementation in MSVC is broken and the control variable
>leaks.
Me too, but then that's because it's so much more maintainable to be
able to repeat such for loops ad nauseum using the same loop var name
without removing the 'int' type declarator. And happily that's not an
issue in Python.
(Hmmm, jumping out of lurk mode with a comment concerning C++. Apologies
for the bad form but I am somewhat of a Python newbie, albeit an
increasingly addicted one).
Sean
--
Sean Legassick
sean at datamage.net
http://www.informage.net - bloggin' along
More information about the Python-Dev
mailing list