Nick Coghlan added the comment:

Well, there's an expected keyboard shortcut (accidentally hitting Shift-Enter 
submits the page...)

Anyway, the idea I came up with after looking at that is potentially adjusting 
functools.partial to accept a "call_target" parameter, which would allow it to 
*claim* to be a partial object calling "func" (and reporting its signature 
accordingly) while *actually* calling "wrapped_func" (which may not have 
accurate signature information).

That underlying feature could then be used as the basis for a new 
"wraps_validated" API that works by creating a partial object around the 
underlying function with the call target set to the decorated wrapper function.

----------
title: Accept a separate "target -> Accept a separate "call_target" parameter 
to functools.partial

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

Reply via email to