> Subject: > Re: [Tutor] __slots__ > From: > Kent Johnson <[EMAIL PROTECTED]> > Date: > Wed, 12 Oct 2005 18:22:46 -0400 > > CC: > Python Tutor Mailing List <tutor@python.org> > > > Liam Clarke wrote: > >> Well, all I can say is, don't use them unless you need them, they're a >> lot of hassle. > > > I think the conventional advice is something like, if you don't > understand why using slots is a bad idea, you have no business using > them :-) >
Can you tell us the pros and cons of using slots? Although I haven't used them yet, they seem like a way to lock down a class so you don't accidentally add new attributes to that class. (emp.name vs emp.nmae) Might be handy when working on a team too. Although something like Pychecker would most likely catch those accidents. <shrug> I dunno. Mike _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor