"Asrarahmed Kadri" <ajkadri googlemail.com> wrote
> Single underscore as a prefix in variable naming...??
whats it for??
>
> Any idea..
Its a convention to indicate that this variable is not for
general
use.
It is part of the internal implementation of the class or
module.
But it is only a convention and Python will not stop you
from
accessing it. It is similar to the convention of using all
uppercase
letters to indicate a constant value that should not be
changed
by users of the code.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://ww
w.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist - Tutor python.org
http://
mail.python.org/mailman/listinfo/tutor
|