nonlocal
C2Pronunciation
UK
- /nˌɒnlˈəʊkəl/
US
- /nˌɑːnlˈoʊkəl/
Description
- Not from one place
- Outside the nearby area
- Reaching beyond one region
- Not limited to a single location
- Coming from a wider scope
Imagine a small town market. The apples from a nearby farm are local. The tea shipped in from another country is not. That wider source is what "nonlocal" points to: something that does not belong to just one nearby place.
In a general sense, "nonlocal" describes something that comes from outside the immediate area or is not limited to one place. It can describe goods, people, ideas, or systems that reach across regions. In physics, it has a more technical meaning and refers to effects that cannot be explained only by what is happening at one point in space. In programming, a nonlocal variable is used inside a function but is defined in an outer function, not in the current one.
The word "nonlocal" essentially signifies something that is not restricted to a particular place or area. It is formed by the prefix "non-" (meaning "not") and "local" (referring to a specific location). While the definition seems straightforward, its application shifts across different fields, making it a surprisingly versatile term.
In everyday language, "nonlocal" describes things that are not tied to one specific area. A nonlocal visitor comes from outside the area. A nonlocal ingredient in a meal is brought in from somewhere else rather than grown or made nearby. A nonlocal service or business may operate across many towns or regions instead of serving only one small community. In this broad sense, the word often suggests distance, wider reach, or an outside source.
However, "nonlocal" takes on a much more technical meaning in physics, especially in discussions of quantum mechanics. There, it refers to relationships or effects that are not fully described by events at a single point in space. It often appears in discussions of quantum entanglement, where linked particles show connected behavior over distance. The basic idea is not simply "far away," but "not limited to one local point."
In computer science, the term also has a clear technical use. A nonlocal variable is one that a function can use even though that variable was defined in an outer function rather than inside the current function itself. In other words, it is not local to the present scope, but it is not fully global either.
Whether you're discussing place, physics, or programming, "nonlocal" points to the same core idea: something extends beyond the immediate location or scope. The details change by field, but the heart of the word stays steady. It tells you that the thing being described is connected to a wider area, a broader system, or a level outside the nearest point.
Examples
- 1
Python keyword
In Python, the inner function used `nonlocal count` so it could update the counter from the outer function.
Pattern
nonlocal + variable name
use that variable from the surrounding function
- 2
Callback state
The bug disappeared when I stopped changing nonlocal state inside the callback.
Domain
nonlocal state
data kept outside the current function
- 3
Physics correlations
Physicists use the term nonlocal correlations when measurements in different places are linked in a way classical physics cannot explain.
Domain
nonlocal correlations
links between distant events in physics
Forms and spellings
1 form open this card.
Main spelling
- nonlocal