[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] your opinion: singleton-pattern vs. modules vs. classes



kschnee wrote:
I later decided that this was stupid. Why make a class if I'm only going to
make one instance of it and then have to refer to module.object.function(),
when Python treats modules themselves as objects too?

Sometimes there are reasons, e.g. you want the object
to have properties, which modules can't do.

But otherwise, using a module is fine.

--
Greg