Top "Self" questions

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

How to use self parameter, @staticmethod keyword inside a class and its methods

I have a python class which has multiple methods. I have defined my methods via @staticmethod instance and I want …

python class methods arguments self
Lua self references

How exacyly do you get variables within a program with self? Like in Java you have: private int a public …

lua this self
Python assigning two variables on one line

class Domin(): def __init__(self , a, b) : self.a=a , self.b=b def where(self): print 'face : ' , self.…

python int self
Why does Array#each return an array with the same elements?

I'm learning the details of how each works in ruby, and I tried out the following line of code: p [1,2,3,4,5].…

ruby arrays each self
Swift - perform Segue

if (view.annotation.title as String!) == "Helgoland " { currentLong = 7.889021 currentLat = 54.180210 url = "google.com" let alertController: UIAlertController = UIAlertController(title: "Change Map Type", …

ios swift self
Can a JavaScript function return itself?

Can I write a function that returns iteself? I was reading some description on closures - see Example 6 - where …

javascript function self
PHP: self:: vs parent:: with extends

I'm wondering what is the difference between using self:: and parent:: when a static child class is extending static parent …

php class static parent self
Java "self" (static) reference

I am looking for a "self" reference to the current class in JAVA in a static context manner like in …

java static scope self
How can I decorate an instance method with a decorator class?

Consider this small example: import datetime as dt class Timed(object): def __init__(self, f): self.func = f def __call__(…

python class self python-decorators
Assigning to self in Objective-C

I'm from the C++ world so the notion of assigning this makes me shudder: this = new Object; // Gah! But in …

objective-c initialization self