<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Here's what I expect to happen each time simulation( ) is called: the | class variable NStocks for the class Stock is initialized to an empty | list,
Why would you expect that ;-) A class statement is usually executed exactly once, as in your code. The body of a class statement usually consists of several name bindings: some are explicit, like your NStocks assignment statement; some are implicit, like you __init__ function definition. The resulting dictionary is used to create the class object, which is mostly a wrapper around the dict created by the class statement body. tjr -- http://mail.python.org/mailman/listinfo/python-list