New GitHub issue #119109 from dgrigonis:<br>
<hr>
<pre>
# Bug report
### Bug description:
The comment here https://github.com/python/cpython/blob/100c7ab00ab66a8c0d54582f35e38d8eb691743c/Modules/_functoolsmodule.c#L222
Indicates that it needs to be checked every time. However, once it removes vectorcall in `partial_vectorcall_fallback` there is no mechanism to set it back.
```python
def func(a, b, c=0):
return a - b - c
p2 = partial(func, 1, c=1)
In [13]: print(p2(2)) # -1
vectorcall
call
-2
In [14]:
In [14]: print(p2(2)) # -1
call
-2
In [15]: del p2.keywords['c']
In [16]: print(p2(2)) # -1
call
-1
```
I see 3 possibilities:
a) Sensible: re-set vectorcall after `_PyObject_MakeTpCall` in `partial_vectorcall_fallback`. So that `partial_vectorcall` will stay as a primary entry in all cases.
c) A bit complex, but most efficient: Set additional flag in `partial_setvectorcall`(`pto->hasvcall`) storing state whether `vectorcall` is supported. Then implement fallback in `partial_call` in the same manner as it looks now in `partial_vectorcall`
a) Simple: Leave it as it is, but remove confusion that this needs to be checked more than 1 time.
### CPython versions tested on:
3.11
### Operating systems tested on:
macOS
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/119109">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>