A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/076299.html below:

Deprecate self

Deprecate selfDouglas Alan nessus at mit.edu
Wed Apr 18 04:24:07 EDT 2001
whisper at oz.net (Dave LeBlanc) writes:

> Since self is used for every method of every class, isn't it a bit
> redundant?

Many people find it less confusing to read code that is written this
way.  Otherwise, when you see a variable, you have more choices as to
where the variable might be defined: the local scope, the global
scope, the class scope, etc.

> I don't know of another OO language that makes you manually carry
> around the "this"/"self" pointer/reference...

Languages with multimethods routinely do, because multimethods are
typically not class-centric.  I.e., a generic function in a language
with multimethods dispatches on all the arguments, not just on one of
them, so no particular argument is given special treatment.

For class-centric OO languages, I agree with you -- I don't personally
know of any others that require explicit use of self.

|>oug

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4