# Namespace

say it: **“NAYM-spays”** **/ˈneɪmˌspeɪs/**

A set of names kept separate so they do not clash.

## What is a **namespace**?

A **namespace** is a set of names that keeps them from bumping into each other. Two modules can both have a `total`, because each lives in its own namespace.

```python
import math

pi = 3.14         # your own pi, in your file's namespace
print(pi)         # 3.14
print(math.pi)    # 3.141592653589793: math's own pi, no clash
```

Level: Journeyman · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=3)

Updated: November 17, 2026

## In other subjects

- [Namespace in C#](https://www.ask-codey.com/glossary/namespace-c-sharp)
- [Namespace in Git](https://www.ask-codey.com/glossary/namespace-git)

Source: https://www.ask-codey.com/glossary/namespace
