# \`functools.partial\` placeholder arguments

**URL:** <https://discuss.python.org/t/functools-partial-placeholder-arguments/53487>\
**Category:** Ideas\
**Created:** [May 16, 2024, 8:01am UTC](https://discuss.python.org/t/functools-partial-placeholder-arguments/53487 "2024-05-16T08:01:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dg-pb](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/dg-pb/32/16248_2.png) [@dg-pb](https://discuss.python.org/u/dg-pb)\
**Post date:** [May 16, 2024, 1:49pm UTC](https://discuss.python.org/t/functools-partial-placeholder-arguments/53487/4 "2024-05-16T13:49:56Z")

</div>

I have made the decision being well aware of @rhettinger’s opposition the last time this was proposed.

> [@Functools.partial extension to support specific positional arguments](https://discuss.python.org/t/functools-partial-extension-to-support-specific-positional-arguments/19163/9):
>
> The best attempt I’ve seen is the [better\_partial](https://github.com/chrisgrimm/better_partial) project. It has many features, but the core syntax is `g = partial(f)(10, _, 20, _, 30)` to create the equivalent of `g = lambda b, d: f(10, b, 20, d, 30)`.

This is exactly what this implements.

I addressed a certain part of opposition from back then and I think that this proposal adds new information too:

1. My research suggests that there is a considerable amount of repetition implementing such functionality (this has not been emphasised last time). At the same time, none of them are implemented efficiently.
2. I have a working code with benchmarks and a case for performance, which wasn’t the focus last time. Performance of such python implementation compared to C extension is more than 10x times higher. This also provides ability to efficiently make use of performant functions in standard library at a fraction of cost. Together these can be a powerful toolkit for cases where performance is crucial.
3. I have found that implementation does seem much more simple and robust than I initially though. I would dare to guess that implementation and maintenance cost might have been overestimated at the time.
4. Finally, this suggestion came from a certain endeavour to improve performance of particular problem so I hope this can be seen as positive contributing factor to the case.

So I would be happy to receive a sincere reconsideration as I currently genuinely think this could be a valuable addition.

---

_[View the full topic](https://discuss.python.org/t/functools-partial-placeholder-arguments/53487)._
