Yury Selivanov added the comment:

Please review the attached patch.

Here's the new partial signature semantics:

   foo(a, b, /, c, d, *args, e)

   partial(foo, 10) -> (b, /, c, d, *args, e)
   partial(foo, 10, c=11) -> (b, /, *, c=11, d, e)
   partial(foo, 10, 20, 30) -> (d, *args, e)
   partial(foo, 10, 20, 30, 40, 50) -> (*args, e)
   partial(foo, 10, 20, c=20) -> (*, c=20, d, e)

Good news: 

1. no more special attributes and other hidden hacks.

2. only with this patch we properly support functools.partial. So this is 
definitely something we can classify as a bug fix and push in 3.4.1.

----------
keywords: +patch
Added file: http://bugs.python.org/file34706/signature_partial_fix_01.patch

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

Reply via email to