[Python-Dev] PEP 309: Partial method application
ianb at colorstudy.com
Thu Aug 18 20:05:54 CEST 2005
Raymond Hettinger wrote:
>>>> lst = ['A', 'b', 'C']
>>>We've already got one:
>>Doesn't that just sort on the str.lower or unicode.lower method
> My mistake. It sorts on the bound method rather than the results of
> applying that method.
Then I thought it might be right to do
partial(operator.attrgetter('lower')). This, however, accomplishes
exactly nothing. I only decided this after actually trying it, though
upon reflection partial(function) always accomplishes nothing.
I don't have any conclusion from this, but only mention it to
demonstrate that callables on top of callables are likely to confuse.
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Python-Dev