Raymond Hettinger <rhettin...@users.sourceforge.net> 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 existing partial() function instead of changing partial() to fit the language seems like "the tail wagging the dog". FWIW, I don't think partial actually buys you anything useful. It's implementation isn't as flexible as a lambda, nor is it any faster. I think it mainly serves those who have an aversion to lambda, perhaps because of its name. Also, I don't think it's a good idea to assign arbitrary keywords to the operator functions unless those keywords have some meaning that makes programs more readable. The names "a" and "b" are only mildly useful a position placeholders. Names like "divisor" and "dividend" are more descriptive, but that is overkill. Overall, am -1 on the proposal. ---------- assignee: -> rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5567> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com