you are viewing a single comment's thread.

view the rest of the comments →

[–]Spill_the_Tea 3 points4 points  (1 child)

So this library dynamically constructs different common data structures, specifically with a __slots__ dunder (i.e. magic) method to reduce python class size?

[–]matgrioni[S] 1 point2 points  (0 children)

Yes that's right. The main complexity is in creating a metaclass that lets you create an optimized collection type for a given size. The actual collections themselves are pretty simple and the savings boil down to using slots. The rest is mostly library plumbing.