[Python-Dev] Partial function application 'from the right'
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))
> Python-Dev mailing list
> Python-Dev at python.org
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