[Tutor] OOP and Python.. a gentle remark
Asrarahmed Kadri
ajkadri at googlemail.com
Wed Oct 25 11:16:58 CEST 2006
Folks...
Please dont take it in a wrong sense. But I have a point to make regarding
OOP and the way it is implemented in Python.
Why is it necessary to explicity use self argument in the class functions
?? I feel the language/interpreter should figure out which object has called
the function? Isnt it ? (the use of 'self' keyword really confuses me. and
to make matter worse the variables can be accessed from outside teh class.
Isnt it a violation of the OOP principle of ENCAPSULATION)
Also please let me know hwo can we declare PRIVATE VARIABLES in Python...??
Regards,
Asrarahmed
P.S. : I love Python. :)-
--
To HIM you shall return.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061025/a8b8f25c/attachment.html
More information about the Tutor
mailing list