"Christopher Brookes" <chris.klai...@gmail.com> wrote
Is there in Python private/protected attributes in class like in
other
langage ?
Steven has given you a comprehensive answer but as a bit of
history none of the early OOP languages used public/protected/private
etc. They either made all variables private (Smalltalk) or public
(Object Pascal and Simula(I think) ).
It was really C++ that started the vogue for mixing and matching
the styles. Even it didn't introduce protected until version 1.2 of
the language and Stroustrup admits to having concerns and
doubts about the wisdom of the decision. But several other
languages (Java, Object Pascal(aka Delphi) ) have followed
C++ down that route.
Python just asks users to be sensible, it doesn't attempt
to protect(excuse the pun) them from themselves!
Just musing....
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor