# Passing config variables to functions so they behave as compile time constants

**URL:** <https://numba.discourse.group/t/passing-config-variables-to-functions-so-they-behave-as-compile-time-constants/2619>\
**Category:** Support: How do I do ...?\
**Created:** [June 27, 2024, 5:41am UTC](https://numba.discourse.group/t/passing-config-variables-to-functions-so-they-behave-as-compile-time-constants/2619 "2024-06-27T05:41:40Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Sumit112192](https://yyz2.discourse-cdn.com/free1/user_avatar/numba.discourse.group/sumit112192/32/1093_2.png) [@Sumit112192](https://numba.discourse.group/u/Sumit112192)\
**Post date:** [July 4, 2024, 12:56pm UTC](https://numba.discourse.group/t/passing-config-variables-to-functions-so-they-behave-as-compile-time-constants/2619/9 "2024-07-04T12:56:58Z")

</div>

> [@How to avoid multiple overload functions for the same config variable](https://numba.discourse.group/t/how-to-avoid-multiple-overload-functions-for-the-same-config-variable/2625/3):
>
> A somewhat close solution. So, there is this dead branch pruning in numba @numba.njit def aNumaFunc(flag): if flag is None: variable1 = None else variable1 = "a different dataype" return variable1 The above code will work but, @numba.njit def aNumaFunc(flag): if flag is None: variable1 = 1 else variable1 = "a different dataype" return variable1 This would not.

Can you look at this question?

---

_[View the full topic](https://numba.discourse.group/t/passing-config-variables-to-functions-so-they-behave-as-compile-time-constants/2619)._
