WordGarden.io

nonlocal

C2
Rare

Pronunciation

UK

    US

      Meanings

      Adjective

      1. not limited to a nearby area or not coming from the local area

      2. defined outside the current function, scope, device, or local system

      3. in math or physics, involving relations or effects across separated points rather than one location

      Beyond the definition

      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.

      Examples

      1. 1

        Python keyword

        In Python, the inner function used `nonlocal count` so it could update the counter from the outer function.

        • Patternnonlocal + variable name

          use that variable from the surrounding function

      2. 2

        Callback state

        The bug disappeared when I stopped changing nonlocal state inside the callback.

        • Domainnonlocal state

          data kept outside the current function

      3. 3

        Physics correlations

        Physicists use the term nonlocal correlations when measurements in different places are linked in a way classical physics cannot explain.

        • Domainnonlocal correlations

          links between distant events in physics

      See also

      Similar

      Shades of meaning

      Contrast

      Do not confuse

      Used with (collocations)

      • nonlocal variable
      • nonlocal interaction
      • nonlocal effect

      Explore

      Forms and spellings

      1 form open this card.

      Main spelling

      • nonlocal