[issue5567] Operators in operator module don't work with keyword arguments

2009-04-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, it makes no sense to me to add keyword arguments everywhere just to accommodate partial(). The alternative using lambda is workable and there have been proposals to further build-out partial. I acknowledge your distaste for lambda but it is firmly a

[issue5567] Operators in operator module don't work with keyword arguments

2009-03-26 Thread Marek Kubica
Marek Kubica added the comment: Well, some Schemes have an CURRYR variant which creates partial functions with positional arguments from the right but the current solution with partial accepting keywords is way more flexible since I can pre-set any arguments I like in such a function in any orde

[issue5567] Operators in operator module don't work with keyword arguments

2009-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sounds like what you're really looking for is a version of partial() that lets you bind positional arguments in any position. Something like: partial(operator.mod, (1,2)) that pre-binds 2 to argument position 1. Changing the language to match the existin

[issue5567] Operators in operator module don't work with keyword arguments

2009-03-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue5567] Operators in operator module don't work with keyword arguments

2009-03-26 Thread Marek Kubica
New submission from Marek Kubica : When calling operators from the ``operator``-module, they refuse to accept keyword arguments: operator.add(a=1, b=2) TypeError: add() takes no keyword arguments Operators with keyword arguments are important when one wants to create partial functions with non-