On Fri, Dec 16, 2011 at 11:32 PM, Terry Reedy <tjre...@udel.edu> wrote: > On 12/16/2011 5:03 AM, Mark Shannon wrote: > >> Of course using __slots__ saves more memory, >> but people don't use them much. > > > Do you think the stdlib should be using __slots__ more?
Note that unlike some other more advanced approaches, slots do change semantics. There are many cases out there where people would stuff arbitrary things on stdlib objects and this works fine without __slots__, but will stop working as soon as you introduce them. A change from no slots to using slots is not only a performance issue. Cheers, fijal _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com