A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-March/002721.html below:

[Python-Dev] None as a keyword

[Python-Dev] None as a keyword / class methodsgvwilson@nevex.com gvwilson@nevex.com
Thu, 23 Mar 2000 14:33:47 -0500 (EST)
Hi, Christian; thanks for your mail.

> What I would propose instead is:
> make the parameter name "self" mandatory for methods, and turn
> everything else into a static method.

In my experience, significant omissions (i.e. something being important
because it is *not* there) often give beginners trouble.  For example,
in C++, you can't tell whether:

int foo::bar(int bah)
{
  return 0;
}

belongs to instances, or to the class as a whole, without referring back
to the header file [1].  To quote the immortal Jeremy Hylton:

    Pythonic design rules #2:
         Explicit is better than implicit.

Also, people often ask why 'self' is required as a method argument in
Python, when it is not in C++ or Java; this proposal would (retroactively)
answer that question...

Greg

[1] I know this isn't a problem in Java or Python; I'm just using it as an
illustration.




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