Let's talk about the cool-Performance of python and the cool-Performance of python.

Source: Internet
Author: User

Let's talk about the cool-Performance of python and the cool-Performance of python.

I have been writing php for 10 years. Python has been rewritten this year.

In contrast, the python niubi:

#) Modularization is better than php;

#) The application scope is much larger than that of php. python isFull functionScript! Php is dedicated to writing dynamic web pages, while py can be used to play with desktop applications and many other aspects, such as pyqt5 and pycef3;

#) Python code encryption is easier than php code encryption, because cython is a big killer! At present, almost all the encryption in php can be found on the Internet!

 

What makes python uncomfortable:

#)Indent syntax! This is highly controversial. The indent syntax is obviously unpleasant and inconvenient for communication. If there is no indentation syntax, there will be no space to compete with Tab. The python code is pasted on the bbs on the Internet, and the format is usually out of order. If it is copied, it cannot be used.

Check whether the python code format is messy!

V2ex is not a small website, but does not support python code.

In contrast, c, c ++, and php are not afraid of parentheses. If the format is out of order, you can force format back.

So I think python should use another method to force the format, that is, the Code with invalid format cannot run directly!

That is, the official format tool must be used before the code is run! In this way, everyone's code can use the same format.

Bytes --------------------------------------------------------------------------------------------------------

But why do so many python followers prefer indentation? (The comment is disabled in this article, or someone will spray the comment)

The reason is: no secret! Python is actually very powerful in general. It is one of the most powerful scripting languages! Ordinary code workers do not like indentation and there is no way to change. If they are unable to change, they gradually get used to it and fall in love with it after a long time.

I used to talk about one thing in the news: Li Hao, the principal criminal of the sex slaves case in the basement of Luoyang. When the victim sex slaves were rescued, they worried about Li Hao's security. Seems to fall in love with the attackers.

This is a strange psychological phenomenon of mankind. It will be accepted and even deemed necessary for the long-term irreparable harm!

(If this kind of change is not done psychologically, the brain will have to be in a state of conflict and tangle. It will go crazy after a long time! It is better to fall in love with it, so that the brain can take a break)

Bytes --------------------------------------------------------------------------------------------------------

 

#) Python is really not fast. However, it is an order of magnitude different from php. For those who have been used to php for many years, they don't feel like they can quickly complete the task.

 

Bytes --------------------------------------------------------------------------------------------------------

In addition, the php array is indeed the most powerful and flexible data structure in all languages. It is a memorable feature.

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.