Ulrich Eckhardt added the comment:

There is at least one thing that is missing in the patch, it lacks the 
necessary tests. The partialbug.py demonstrates the issue, it could be used as 
a base. However, even then, there is still one thing that is problematic: The 
fact that partial() returns something that behaves like a static method is 
documented and changing that is not backward compatible.

I still think that something like this should become part of Python though. 
Jack Diederich argues that you can use lambda to achieve the same, but that is 
not always true. If you want to bind an argument to the current value of a 
variable instead of a constant, lambda fails. You need the closure created by a 
function call to bind those variables inside a local function. Having a 
dedicated function for that is IMHO preferable to people copying the 
Python-only equivalent of partial() to achieve the same effect or even 
inventing their own.

----------

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

Reply via email to