On Sat, 13 Aug 2016 08:12 am, Lawrence D’Oliveiro wrote: > On Friday, August 12, 2016 at 9:39:11 PM UTC+12, BartC wrote: > >> 'year' has been spelled wrongly > > That’s why Python has __slots__.
No, that is OFFICIALLY *not* why Python has __slots__. Python has __slots__ in order to support applications where you have huge numbers of small objects where the collective memory used by millions of unused __dicts__ is significant. You may choose to (ab)use __slots__ to avoid the caller adding new attributes to your objects, but that practice is discouraged. -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse. -- https://mail.python.org/mailman/listinfo/python-list