Differences between the Python programming language and other languages

Source: Internet
Author: User

There are many problems with the Python programming language. Next we will learn the relevant languages in detail. First, let's take a look at how to learn. I have been learning the Python programming language for a short time, so I won't talk about a very high-level topic.

Let's talk about the differences between Python and JAVA in actual programming. Soon after learning, I have a limited understanding. I hope you can correct me more, and I will continue to improve this article.

The code in the Python programming language is quite similar to that in Java. After learning for a while, I feel a kind of intimacy. So let's just call it Java.

Although the Everything is Object is declared in Dive Into Python, in the process of using it, I realized that Python is not really OO, and the class is only a method organization unit that is lower than the module level, rather than the real class. From the academic perspective of OO, Python can only score 60 points, and many OO features are more like those for OO.

  • Python programming language with simplified read flexibility
  • Measure the test taker's knowledge about the Python programming language in a short time.
  • Introduction to the history of the Python Programming Language
  • Describes the Python programming language.
  • Performance Comparison Between the Python programming language and Java

1) the dynamic type language makes it clear from the method interface that the parameter and returned result are of any type, and of course there is no so-called interface.

2) rough default public and _ private methods, no concept of protection and intra-package visibility

3) annoying and ubiquitous self

All methods except static methods and class methods must use self as the first parameter. In this case, you also need to add self for the member variables and the applications of your own methods .. If the program is small, I would rather use the module method directly, just like the n builtin modules in the Python programming language.

4) inconvenient log

Although there is something similar to log4j, the initialization and configuration of log is carried out in the program, which is not convenient and I am used to using print. But in a project like Django, I cannot see the log. Why can't I find a place? Or is there really no log? Confused.

Python programming language advantages

Compared with Java, the Python programming language is flexible and concise. For the same function, Java usually needs 3 to 5 lines of code in Python.

1) flexible string to facilitate the provision of ultra-long string Definition

2) concise, multi-row, annotated Regular Expressions

3) Dynamic Language Features. AJAX is a perfect combination, because it is similar to JavaScript OO.

4) A wide range of third-party class libraries and Python programming languages have a considerable history. The copyright of the website is 1990-2006, and there is already a wealth of application bases in foreign countries. Common third-party class libraries are all available.

Currently, PyDev is the best tool for development. I am used to the continuous code refactoring. Without such support, I feel very uncomfortable. Due to the dynamic characteristics of Python, the refactoring of PyDev is still unsatisfactory, which makes me very skeptical, the feasibility of the Python programming language during team development.

In short, as a dynamic and strong type language, the Python programming language has achieved a good balance between the rigor of OO and the casual process. Although it cannot be used as a language for OO teaching, it is indeed a good tool for compiling Small and Medium software and systems.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.