Top "Scope" questions

Scope is an enclosing context where values and expressions are associated.

Advanced Nested List Comprehension Syntax

I was playing around with list comprehensions to get a better understanding of them and I ran into some unexpected …

python syntax scope list-comprehension
Reference: What is variable scope, which variables are accessible from where and what are "undefined variable" errors?

Note: This is a reference question for dealing with variable scope in PHP. Please close any of the many questions …

php scope
Angularjs: how to pass scope variables to a directive?

I am trying to use directive to create and append several tags to a <div> as shown below: …

javascript angularjs scope directive
Global scope vs global namespace

I saw usages of these two phrases: global scope and global namespace. What is the difference between them?

c++ namespaces scope terminology
Can a Jinja variable's scope extend beyond in an inner block?

I have the following Jinja template: {% set mybool = False %} {% for thing in things %} <div class='indent1'> <…

templates variables scope jinja2
Derived template-class access to base-class member-data

This question is a furtherance of the one asked in this thread. Using the following class definitions: template <class …

c++ templates inheritance scope name-lookup
When is an object "out of scope"?

In C++, when is an object defined as "out of scope"? More specifically, if I had a singly linked list, …

c++ scope destructor
Create prototype scoped Spring bean with annotations?

Is it possible to convert the following XML configuration to an annotation based one? <bean id="myBean" class="my.…

java spring annotations scope javabeans
Declaring an object before initializing it in c++

Is it possible to declare a variable in c++ without instantiating it? I want to do something like this: Animal …

c++ scope declaration instantiation
Function/variable scope (pass by value or reference?)

I'm completely confused by Lua's variable scoping and function argument passing (value or reference). See the code below: local a = 9 …

variables scope lua