# Add None coalescing operator in Python

**URL:** <https://discuss.python.org/t/add-none-coalescing-operator-in-python/8292>\
**Category:** Ideas\
**Created:** [April 19, 2021, 5:03am UTC](https://discuss.python.org/t/add-none-coalescing-operator-in-python/8292 "2021-04-19T05:03:24Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![cameron](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cameron/32/2658_2.png) [@cameron](https://discuss.python.org/u/cameron)\
**Post date:** [December 11, 2022, 11:38pm UTC](https://discuss.python.org/t/add-none-coalescing-operator-in-python/8292/16 "2022-12-11T23:38:53Z")

</div>

This is often spelled:

```
 new_variable = a_variable or 'Hello Python'

```

in Python. It doesn’t work if, say, `''` is a valid value but is  
otherwise effective. So we’ve got maybe 90% (wild guess) of the use  
cases covered with just that.

Cheers,  
Cameron Simpson [cs@cskk.id.au](mailto:cs@cskk.id.au)

---

_[View the full topic](https://discuss.python.org/t/add-none-coalescing-operator-in-python/8292)._
