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

Calvin Spealman ironfroggy at gmail.com
Sat Jan 31 01:38:23 CET 2009

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

On Fri, Jan 30, 2009 at 4:20 PM, Mike Klaas <mike.klaas at gmail.com> wrote:
> On 29-Jan-09, at 3:38 PM, Daniel Stutzbach wrote:
>> On Thu, Jan 29, 2009 at 5:24 PM, Mike Klaas <mike.klaas at gmail.com> wrote:
>>> And yet, python isn't confined to mathematical notation.  *, ** are both
>>> overloaded for use in argument lists to no-one's peril, AFAICT.
>> Certainly, but there is no danger of confusion them for multiplication in
>> context, whereas:
>> split_comma = partial(str.split, ..., ',')
>> to me looks like "make ',' the last argument" rather than "make ',' the
>> second argument".
> Yes, I agree.  I mistakenly thought that that was the proposal under
> discussion (that partial(f, ..., 2) == right_curry(f, 2))
> -Mike
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/ironfroggy%40gmail.com

Read my blog! I depend on your acceptance of my opinion! I am interesting!
Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy

More information about the Python-Dev mailing list