[Python-Dev] Partial function application 'from the right'

Antoine Pitrou solipsis at pitrou.net
Sat Jan 31 01:42:40 CET 2009


Calvin Spealman <ironfroggy <at> gmail.com> writes:
> 
> I am just replying to the end of this thread to throw in a reminder
> about my partial.skip patch, which allows the following usage:
> 
> split_one = partial(str.split, partial.skip, 1)
> 
> Not looking to say "mine is better", but if the idea is being given
> merit, I like the skipping arguments method better than just the
> "right partial", which I think is confusing combined with keyword and
> optional arguments. And, this patch already exists. Could it be
> re-evaluated?

Sorry, where is the patch?
If one writes X = partial.skip, it looks quite nice:

split_one = partial(str.split, X, 1)

Regards

Antoine.




More information about the Python-Dev mailing list