@veer66 Correct. Generally only a function or class will open a new scope/namespace.
But also take care with exception handler (argument)s and list comprehension and generator expressions.
@veer66 Correct. Generally only a function or class will open a new scope/namespace.
But also take care with exception handler (argument)s and list comprehension and generator expressions.
@veer66 ?
No. It has nothing to do with "naming" the if-block, but with resolving a variable name (the unqualified reference). The if-expression may or may not use variables, but that is irrelevant.
An if-block does not create a separate scope.
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.