Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeConcepts
Self

Self

Self is a reference to the object on which the current method operates.

Related concepts:  ObjectReferenceMethod

Closest Wikipedia entry:  This (computer programming)

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Self is based on principled authoritative sources such as:

Types and Programming Languages - Section 18.9

Misconceptions about Self
9 documented Misconceptions

Any LanguageJavaJavaScriptPythonScratch
Check Yourself
Misconception
ThisAsField — Java
this is a special field in the object
Misconception
ThisAssignable — Java
One can assign to this
Misconception
ThisCanBeNull — Java
this can be null
Misconception
ThisExistsInStaticMethod — Java
this is a local variable, also in static methods
Misconception
ThisInConstructorIsNull — Java
In a constructor, this is null
Misconception
ThisNoExpression — Java
The name this is not an expression
Misconception
ThisAssignable — JavaScript
One can assign to this
Misconception
SelfAssignable — Python
Reassigning self changes the object on which a method is called
Misconception
SelfNoExpression — Python
The name self is not an expression

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors