3 ms·
Did not know this. Thought self was equivalent to this in Java. Mind = blown.
by anindyabd 12y ago
Did not know this. Thought self was equivalent to this in Java. Mind = blown.
- raverbashing 12y agoSee, you pass it as a parameter So it can be called anything you want BUT DON'T DO IT! Because you'll break the convention and anyone who maintains your code after that will hate you.
- eatonphil 12y agoYou can ALSO declare a class member function in a different file. Since it just accepts self as the first parameter... It still works.