[Python-Dev] Partial function application 'from the right' (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Thu Jan 29 23:30:27 CET 2009


Nick Coghlan <ncoghlan gmail.com> writes:

If partial starts messing about looking for missing arguments and then slotting them in, then it is likely to slow down to the point where you would be better off skipping it and writing a dedicated function that adds the extra arguments.

Looking for missing arguments is very cheap, just raw pointer compares (Ellipsis is a singleton). In comparison, the cost of executing a dedicated Python function would be overwhelming.



More information about the Python-Dev mailing list