why self instead obj ?
Gerard Breiner
gerard.breiner at ias.u-psud.fr
Thu Mar 6 11:00:10 EST 2003
Hello,
I am beginner in Python and i wonder why the first argument of the__init__
function is called "self" instead "obj" whereas self indicates
the object itself .
Moreover, "obj" is easier to type on the keyboard and shorter than "self".
However, i know i can use "obj" since "self" is a convention of naming, but
it is better if everyone speaks the same language.
Other people would think that "this" is better (as in java), but "obj" seems
to me more suitable.
What do you think about it ?
Best regards.
Gerard Breiner
Institut d'Astrophysique Spatiale
Orsay-France
More information about the Python-list
mailing list