[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2017-02-27 Thread Berker Peksag
Berker Peksag added the comment: PR 253 has been merged. -- nosy: +berker.peksag resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2017-02-23 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue to propose to add a comment explaining why the dictionary must always be copied: https://github.com/python/cpython/pull/253 -- pull_requests: +221 resolution: rejected -> status: closed -> open

[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2016-08-26 Thread Ned Deily
Changes by Ned Deily : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2016-08-26 Thread STINNER Victor
STINNER Victor added the comment: Ah yes sorry, I misunderstood the link between kwargs from a C function and a PY function. The link is simple, it's the same object :-) This issue can be closed. -- ___ Python tracker

[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2016-08-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Antoine. -- ___ Python tracker ___ ___ Python-bugs-list

[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2016-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Modifying the keyword arguments dict is quite common so this change would be a heavy compatibility breaker. A well-known idiom: def some_function(..., **kwargs): some_option = kwargs.pop('some_option', None) # further process kwargs --

[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2016-08-23 Thread STINNER Victor
New submission from STINNER Victor: I justed optimized partial_call() for positional arguments in the change c1a698edfa1b to avoid the creation of a temporary tuple when possible. I noticed that keyword parameters from partial() constructor are always copied. Is it mandatory? Can't we avoid