Newbie asks about static variables...

Emile van Sebille emile at fenx.com
Wed May 5 06:58:59 EDT 1999


 Gordon,

Thanks for your reply.  I haven't yet done any specific testing, but would
you know if in fact the complaints of this behavior result from
misunderstanding, or is there an actual bug such that the results are
unpredictable?

In other words, is there any reason to avoid using this construct knowing
that this is how it works?  Or, is there reason to think that it may be
changed to behave differently in some future release?

Emile van Sebille
emile at fenx.com
-------------------

> Emile van Sebille, in reply to Evan's creative use of a mutable
> default:
>
> > Being also new at Python, doesn't your example follow the example
> > from section 4.7 of the tutorial?
> >
> > Why is this *evil*?  It's right there in the tutorial.  </aside - I
> > really do believe everything I read> What is Guido not saying? What
> > are the dangers?  Where is the case study?
>
> The case study is the volume of posts complaining that something's
> broken. This is in the top 3. Evan's use of it as a "feature" is
> outnumbered 1,000 to 1 by complaints that it's a bug.
>
> Congratulations - you may well be unique in having both read and
> retained this from the tutorial!
>
> - Gordon
>
>






More information about the Python-list mailing list