On 23/10/13 17:01, Glenn Lester wrote:
I have come across the term "self" in a number of Python scripts and as
a beginner to the language I am wondering if it has any specific
meaning.
Technically no, the name is arbitrary but self is used by (very strong)
tradition. As to what it is used for
I have come across the term "self" in a number of Python scripts and as a
beginner to the language I am wondering if it has any specific meaning. It
is usually used in the same manner as in this example by Steven D'Aprano.
class DefaultModelCar:
model = "Unknown"
BRAKE_COMMAND = "B"