Python has no blockscoping, such that the second assignment is not considered an declaration cause the variable has already been intialized in the "wider" scope (file or function)
Perl has blockscoping such that a command like nonlocal would be needed far too often ... or more "headache" (sic) would be needed figure out a workaround.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
In reply to Re^4: Opinion: where Perl5 wasn't attractive for me
by LanX
in thread Opinion: where Perl5 wasn't attractive for me
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |