add extra value to kwarg list
<p>Suppose there is the following external module and its spelled out like this:</p>

<p><strong>module1.py</strong></p>

<pre><code>X = [1,2,3]

def test_func(keyword_list=X):
    return keyword_list

test_func()
</code></pre>

<p>In another file I am trying to add another item to the kwarg <code>X</code> where ill be making my call and that will be here:</p>

<p><strong>my_file.py</strong></p>

<pre><code>from module1 import test_func

test_func()
...
</code></pre>

<p>Is there any way concise way of adding an extra list item to my kwarg in my initial call to <code>test_func</code>. I know technically I could something like the following:</p>

<pre><code>from module1 import test_func, X

test_func(keyword_list=X + [4])

[1,2,3,4]
</code></pre>

<p>Is there anyway to do this without importing <code>X</code> directly from <code>module1.py</code>?</p>

<p><strong>Edit</strong> <code>module1.py</code> is an open source module that I can't directly change.</p>

<p>Use another keyword arg:</p>

<pre><code>def test_func(keyword_list=[1,2,3,4], additional_list=[]):
    return keyword_list + additional_list

print(test_func())
print(test_func(additional_list=[5]))
</code></pre>

<p>Should produce</p>

<pre><code>[1, 2, 3, 4]
[1, 2, 3, 4, 5]
</code></pre>

<p>Or use a wrapper function:</p>

<pre><code>def wrapper_test_func(additional_list=[]):
  return test_func(module1.X + additional_list)
</code></pre>

python