I have no class
steve at pearwood.info
Mon Nov 24 05:21:32 CET 2014
On Sun, 23 Nov 2014 09:02:57 -0800, Rustom Mody wrote:
> Python is a bit odd in the OO-world in that it prioritizes "Explicit is
> better than implicit" over convenience.
> Notice that you use self.throw where in most other OOP languages you
> would use just throw.
I don't think that is correct. I think that most OOP languages are like
Python, and use a special variable to reference the current instance:
"self" is used by:
Smalltalk, Python, Perl, Objective-C, Swift, Ruby, OCAML
"this" is used by:
"me" is used by:
ABAP Objects, Visual Basic
"Current" is used by:
In some of these languages, the use of "this/self/me" is optional, but
I'm not aware of *any* OOP language where there is no named reference to
the current object at all.
In any case, Python is not unusual in this regard.
More information about the Python-list