In my opinion, Ellipsis might be in the middle, not only in leftmost or
rightmost, so a placeholder approach can be much more flexible and
convenient.
Here is a reference implementation:
_ = lambda x: x.pop(0)
def partial(func, *args, **keywords):
def newfunc(*fargs, **fkeywords):
for a new function, named parameter might be a better choise, but for
existing function, placeholder would be better, since you don't need to
modify the exiting code.
--
http://mail.python.org/mailman/listinfo/python-list
sorry, should be "existing"
--
http://mail.python.org/mailman/listinfo/python-list
for a new function, named parameter might be a better choise, but for
existing function, placeholder would be better, since you don't need to
modify the existing code.
--
http://mail.python.org/mailman/listinfo/python-list