[Python-ideas] proto-PEP: Fixing Non-constant Default Arguments

Chris Rebert cvrebert at gmail.com
Wed Jan 31 02:59:05 CET 2007


Collin Winter wrote:
 >> On 1/29/07, Chris Rebert <cvrebert at gmail.com> wrote:
>> Why? Yes, there _might_ be performance issues (which have yet to be
>> demonstrated or deeply speculated upon), but re-evaluating immutable
>> default arguments wouldn't affect a program's correct operation.
> 
> If the underlying intent of your proposal -- that all default
> arguments be re-evaluated with every call -- were to be approved,
> there would undoubtedly be a serious performance impact.
[snip]
> As for whether these effects have "yet to be demonstrated", as you
> say, the burden is on you, the PEP author, to investigate and resolve,
> mitigate or justify any and all performance changes.
> 
> Collin Winter
> 

You do have a point there, it is my responsibility. I therefore shall 
endeavor to find out how much of a performance hit my suggested change 
would have.

- Chris Rebert



More information about the Python-ideas mailing list