Julien Palard added the comment:

I think for some builtins it may be usefull to have keyword arguments, in the 
case they take more than one parameter.

Typically, it's impossible to write:

    self.drop_elements(partial(isinstance, type(lxml.etree.Comment)))

Because isinstance take its argument in the "other" order, we may bypass this 
using keywords arguments:


    self.drop_elements(partial(isinstance, type=type(lxml.etree.Comment)))

But isinstance refuses keyword arguments, so there is no way to write this 
without a lambda:

    self.drop_elements(lambda x: isinstance(x,
                       type(lxml.etree.Comment)))

With is cool and work, I agree, it's just an example to explicitly show why 
keywords argument may be cool: functools.partial.

----------
nosy: +Julien.Palard

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8706>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to