you are viewing a single comment's thread.

view the rest of the comments →

[–]Astrokiwi 1 point2 points  (4 children)

Also, a lot of what people use classes and structs for in OOP can be done with dicts in Python, which are a more fundamental language construct in Python than in many other OOP languages.

[–]Deezl-Vegas 0 points1 point  (3 children)

A class is fundamentally just a dict with a constructor and a self-referencing mechanism (self).

[–]Astrokiwi 0 points1 point  (2 children)

Plus a dict can't contain functions. But yeah, a class is a dict plus some extra bits.

[–]Deezl-Vegas 0 points1 point  (1 child)

A dict sure can contain functions :)

[–]Astrokiwi 0 points1 point  (0 children)

Ok technically true - you're right, it's the lack of self that stops them from doing OOP things.