default value in __init__
Chris Rebert
clp at rebertia.com
Thu Oct 16 02:05:40 EDT 2008
On Wed, Oct 15, 2008 at 9:43 PM, Aaron Castironpi Brady
<castironpi at gmail.com> wrote:
> On Oct 15, 11:33 pm, Steve Holden <st... at holdenweb.com> wrote:
>> Aaron "Castironpi" Brady wrote:
>>
>> [about how default argument behavior should, in his opinion, be changed]
>>
>> Say what you like. The language is as it is by choice. Were it, for some
>> reason, to change we would then be receiving posts every week that
>> didn't understand the *new* behavior.
>>
>> Sometimes people just have to learn to confirm with reality instead of
>> requiring reality to confirm with their preconceptions. This is one such
>> case.
>>
>> regards
>> Steve
>> --
>> Steve Holden +1 571 484 6266 +1 800 494 3119
>> Holden Web LLC http://www.holdenweb.com/
>
> I am not convinced it should either stay or go, but it's hard to argue
> one way or the other about something so deeply entrenched. However,
> what are your thoughts, whatever the default behavior is, on a
> decorator that provides the alternative? That is, a decorator that
> either reevaluates default arguments each time when the language
> evaluates them once, or a decorator that evaluates arguments once,
> when the languages evaluates them each time?
>
> P.S.
>> we would then be receiving posts every week that
>> didn't understand the *new* behavior.
> That is not obvious and I don't know of any empirical evidence that
> entails it. Hard to search the standard library for that figure.
Although primitive and likely somewhat flawed, you may find the
statistics in the "Compatibility Issues" section of
http://mail.python.org/pipermail/python-3000/2007-February/005704.html
to be of interest.
Cheers,
Chris
--
Follow the path of the Iguana...
http://rebertia.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list