+ 1
Does Python support encapsulation?
It Depends on how you describe Encapsulation.
3 Answers
+ 5
In Python private member can be accessed from outside.
For me this is not encapsulation.
+ 1
When the Programming was started, initially the importance was given to the logic (code or functions). But as the projects grew bigger and bigger, that idea lead to lot of redundant code/modules and maintainability became a big problem.
So people shifted the importance to data and the functions are understood as the pieces of code operates on data. So, they were logically able to group the functions. That is how OOP paradigm came into existence and became widely popular.
The idea of encapsulation can be understood as "binding up of data and the functions acting on those data, as a single entity". This is the fundamental building block of OOP programmin.
That idea is implemented in most of the languages as Class. Python does support Object oriented programming paradigm as well.
+ 1
please define encapsulation in your words so i could get your point