On 12-10-09 06:59 AM, D.M. Procida wrote:
In Python, using an underscore is simply a convention to note that a
method is private - it doesn't actually hide it from other things -
correct?

Daniele


A single underscore semantically means private. A double underscore will name mangle the function such that it's only accessible strictly by name through the class that it's define in. Note that you *can* still access it if you understand how name mangling works. Nothing in Python is truly private.

--
Demian Brecht
@demianbrecht
http://demianbrecht.github.com
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to