pmaupin at speakeasy.net
Thu Sep 30 04:42:26 CEST 2004
Christopher Barker <Chris.Barker at noaa.gov> wrote:
> Patrick Maupin wrote:
> > But, in Python, instances are "open". This means that I can add
> > attributes to a class instance at _any_ time
> Just to make it really clear what Patrick is saying:
... (code excised here)
> If you don't want a dynamic language, don't use Python!
This is a great example, but just to make sure that no beginners are
confused, I would like to point out that this example is of an actual
class (rather than a class instance) being modified dynamically (when
foo.r is assigned the value False), which was discussed in the
original post, but not in the snippet above the example.
More information about the Python-list