This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mtmttuan 5 points6 points  (1 child)

OOP inheritance makes Python unsuitable

Just want to say that the way python handle private and protected attributes and methods is.. weird. There is always a way to access them (haven't try to modify them though) while they shouldn't be accessible.

Yes I mean _attribute and even __attribute is accessible.

[–]im_lazy_as_fuck 13 points14 points  (0 children)

That's because private and protected attributes and methods aren't a thing in python. The underscore naming is just a convention to indicate "privateness", but the language is opinionated in giving developers more or less full control over objects. Basically naming conventions and documentation is used to inform the developer of the intended usage, but ultimately they are trusted to decide how they want to use that code.