what if i keep my class members are public?

Posted by anish on Stack Overflow See other posts from Stack Overflow or by anish
Published on 2010-05-13T05:26:20Z Indexed on 2010/05/13 5:34 UTC
Read the original article Hit count: 198

Filed under:
|
|

In c++ instance variables are private by default,in Python variables are public by default

i have two questions regarding the same:-

1: why Python have all the members are public by default?

2: People say you should your member data should be private what if i make my data to be public? what are the disadvantages of this approch? why it is a bad design?

© Stack Overflow or respective owner

Related posts about c++

Related posts about python