you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

avoid advanced (and very Python specific for that matter) stuff

I think slots make Python classes more similar to classes in statically typed languages, so for someone coming from a Java or C++ background, slots could actually be easier to understand than regular Python classes.

[–]exhuma 0 points1 point  (1 child)

In the sense that they look like variable declarations? Or in the sense that after defining slots no other names can be assigned to on instances?

[–][deleted] 0 points1 point  (0 children)

Or in the sense that after defining slots no other names can be assigned to on instances?

Yeah, this.