# \_\_new\_\_

say it: **“DUN-der NOO”** **/ˈdʌndər ˈnu/**

Creates the object itself, just before \_\_init\_\_ fills it in.

## What does `__new__` do?

`__new__` actually creates a new object, and it runs just before `__init__` fills it in. You only need it for special cases, like classes that should only ever have one object.

```python
class Settings:
    _only_one = None

    def __new__(cls):
        if cls._only_one is None:
            cls._only_one = super().__new__(cls)
        return cls._only_one

print(Settings() is Settings())  # True: always the same object
```

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

Updated: November 17, 2026

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