Seeking review of an article about Python's origins

In summary: No. Explicit self for class attributes and methods has been required in Python ever since the class statement was introduced, early in version 2. They were certainly not something new that was added in version 3, any more than the class statement itself.In summary, the article discusses the origins of Python and the different ways it has been designed. Python programmers are asked to review and comment on the article. If you have time and interest, you are welcome to do so.
  • #1
harborsparrow
Gold Member
673
186
TL;DR Summary
Kirby Urner has written a new article on the origins of Python, and we are looking for people to review and comment on the article.
Dear Python programmers,

There is a new article on the "origins of Python" at https://en.citizendium.org/wiki/Python_(programming_language)

The Citizendium is a partner site with Physics Forums (cross-linked); we are looking for Python programmers to review and comment on the new article (on its Discussion page). If you have time and interest, please go at it, and thanks in advance.

I've been following the various Python discussions on here. It is one of the few current languages I've never had cause to use much, so I will be interested to know what you all have to say. Or, you can leave your comments here and I will relay them to Kirby, the article's author, from this forum.

Thanks in advance,

Pat
 
  • Like
Likes berkeman
Technology news on Phys.org
  • #2
Well I see one glaring error. Python wasn’t designed to be OO until version 3 and classes were introduced. Earlier pythons were more traditional scripting languages.

I could be wrong but in 3 when I saw the self addition explicitly needed for each class and it’s attributes, I felt that OO was tacked on to python.
 
  • #3
It reads like ad copy.
 
  • Like
Likes jedishrfu
  • #4
jedishrfu said:
Python wasn’t designed to be OO until version 3 and classes were introduced.

This is not correct. Python has had the class statement, allowing user-defined classes and instances of them, since at least early in version 2. (I have been programming in Python since version 2.3, and I was using the class statement then.) Even "new-style classes", which are the only kind of classes in Python 3, were introduced midway in version 2 (version 2.4 or 2.5, I think).

jedishrfu said:
in 3 when I saw the self addition explicitly needed for each class and it’s attributes

I have no idea what you are talking about here. Explicit self for class attributes and methods has been required in Python ever since the class statement was introduced, early in version 2. They were certainly not something new that was added in version 3, any more than the class statement itself.
 
  • #6
  • #7
Interesting thanks for the clarification on the class statement. From my experience though I didn’t see it used in any scripts unless they were v3 based. My apologies.

The self comment is because of my background in java where self is not an explicit argument in any instance method like it is in python. To my mind it was tacked on to the language as opposed to baked into the design of the language. I haven’t found a reason for this convention.
 
  • #8
jedishrfu said:
To my mind it was tacked on to the language as opposed to baked into the design of the language.

No, it wasn't, it was a deliberate design decision from the beginning.

jedishrfu said:
I haven’t found a reason for this convention.

The short version is one of the items from the Zen of Python: Explicit is better than implicit. In a language like C++ or Java, with an implicit "this", you can't tell just from looking at a variable reference inside a member function whether it is a reference to an instance variable or to a global defined elsewhere. In a member function in Python, you know exactly which variable references are to instance variables just by looking at them: the ones with self.

There is also the issue that, if a "self" parameter is implicit, the interpreter has to figure out when to add it to a function. Since Python allows methods to be dynamically added to classes after they are defined, this is not at all straightforward the way it is in C++ or Java.

For some discussion of the explicit self convention (including a discussion of the issue I just described) by Guido van Rossum, see here:

http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-stay.html
 
  • Like
Likes jbunniii
  • #9
jedishrfu said:
From my experience though I didn’t see it used in any scripts unless they were v3 based.

Python libraries and programs that use user-defined classes have been around as long as Python has. The Python standard library itself contains many of them, and has since the earliest versions.

If you haven't been programming in Python for many years, it's quite likely that your experience of Python prior to v3 overall is very limited. Python 3 has been around since 2008 and has been gaining traction steadily since about 2012 or so, when Python 3.3 was released--that was the first Python 3 version that was actually more usable than Python 2 and fixed enough of the mistakes made in earlier Python 3 versions to make people seriously consider starting to migrate legacy code.
 

Related to Seeking review of an article about Python's origins

1. What is the purpose of seeking a review of an article about Python's origins?

The purpose of seeking a review of an article about Python's origins is to gather feedback and constructive criticism from experts in the field. This can help improve the accuracy and credibility of the article.

2. How can I request a review of my article about Python's origins?

You can request a review of your article by reaching out to experts in the field, such as fellow scientists, researchers, or members of the Python community. You can also submit your article to peer-reviewed journals for review.

3. What information should be included in a request for a review of an article about Python's origins?

A request for a review of an article about Python's origins should include the title and purpose of the article, a brief summary of the content, and any specific areas or questions that you would like the reviewer to focus on. It is also helpful to provide a timeline for when you would like to receive feedback.

4. How long does it typically take to receive a review of an article about Python's origins?

The time it takes to receive a review of an article about Python's origins can vary depending on the availability and workload of the reviewer. It is best to provide a reasonable timeline and follow up with the reviewer if necessary.

5. Can I request a review of my article from multiple reviewers?

Yes, you can request a review of your article from multiple reviewers. This can provide a diverse range of perspectives and feedback, which can be beneficial in improving the quality of your article.

Similar threads

  • Programming and Computer Science
Replies
3
Views
473
Replies
21
Views
917
Replies
1
Views
200
  • STEM Academic Advising
Replies
3
Views
682
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • Astronomy and Astrophysics
Replies
1
Views
2K
Replies
5
Views
1K
  • Poll
  • Programming and Computer Science
2
Replies
54
Views
7K
Replies
1
Views
1K
  • STEM Academic Advising
Replies
6
Views
4K
Back
Top