Re: [Python-Dev] Updated PEP 362 (Function Signature Object)

2012年6月06日 07:06:48 -0700

On 2012年06月06日, at 9:28 AM, Isaac Morland wrote:
> On Wed, 6 Jun 2012, Nick Coghlan wrote:
> 
>> 2. Signature.bind introduces the ability to split the "bind arguments
>> to parameters" operation from the "call object" operation
> 
> Has anybody considered calling bind __call__? That is, the result of calling 
> the signature of a procedure instead of the procedure itself is the locals() 
> dictionary the procedure would start with (except presumably missing 
> non-parameter local variables).
I'd stick with more explicit 'bind' method.
Compare (given the 'sig = signature(func)'):
 
 ba = sig(*args, **kwargs)
to:
 
 ba = sig.bind(*args, **kwargs)
The second case looks more clear to me.
Thanks,
-
Yury
 
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to