WordGarden.io
Back to search

nonlocal

C2

Pronunciation

UK

  • /nˌɒnlˈəʊkəl/

US

  • /nˌɑːnlˈoʊkəl/

Description

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.

    • Pattern

      nonlocal + 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.

    • Domain

      nonlocal 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.

    • Domain

      nonlocal correlations

      links between distant events in physics

Forms and spellings

1 form open this card.

Main spelling

  • nonlocal