Nested scopes: why is it weird?
Chris Barker
chrishbarker at home.net
Fri Sep 7 18:48:58 EDT 2001
Paul Prescod wrote:
> I think it should similarly reqiure you to be explicit
> when you want to shadow one. Or it could simply disallow the shadowing
> -- it isn't very useful anyhow. Just call the inner a "inner_a".
I think this would be a nightmare for code maintainance and simple
syntax. How often do you use a simple variable name like "i" for an
index? would you really want to use i in one scope, and then inner_i in
the next, and then inner_inner_i?
And as soon as you re-arranged your code a little, you would have to
re-name a bunch of stuff. I like the current scheme just fine.
-Chris
--
Christopher Barker,
Ph.D.
ChrisHBarker at home.net --- --- ---
http://members.home.net/barkerlohmann ---@@ -----@@ -----@@
------@@@ ------@@@ ------@@@
Oil Spill Modeling ------ @ ------ @ ------ @
Water Resources Engineering ------- --------- --------
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------
More information about the Python-list
mailing list