Top "Self" questions

A keyword used in instance methods to refer to the object on which they are working.

del self vs self.__del__() - and what is the proper way to cleanup in python?

I have a python script that contains a class. This class has a __del__ method for usual cleanup. If I …

python python-2.7 python-3.x self code-cleanup
Python - Timeit within a class

I'm having some real trouble with timing a function from within an instance of a class. I'm not sure I'm …

python self timeit
Why isn't self always needed in ruby / rails / activerecord?

In testing a getter/setter pair in a rails model, I've found a good example of behavior I've always thought …

ruby ruby-on-rails-3 activerecord self
Using self in Django Model classes

While adding model class to models.py in Django, why don't we use self with the field variables which we …

python django django-models self
Notice: Use of undefined constant self - assumed 'self' , When put in property_exists as the first argument

I'm trying to use self instead of typing the class name inside propery_exists function as follows : private static function …

php oop properties constants self
Inheriting instance variables in Objective-c

In Objective-c 2.0 why do subclasses need to reference instance variables in parent classes using the self keyword? Consider this example: // …

objective-c inheritance instance-variables self