When should I switch from python2 to python3?

Source: Internet
Author: User
The author has a moderate coding level and has written many things in Python. However, a large number of packages currently support Python2. Therefore, currently, it is basically encoded on Python2. I always think we should learn about Python3, but I don't know when to turn to it. Do you have any comments? The author has a moderate coding level and has written many things in Python.
However, under current requirements, a large number of packages support Python2. Therefore, currently, it is basically encoded on Python2.
I always think we should learn about Python3, but I don't know when to turn to it. Do you have any comments? Reply: from now on, make your code compatible with python2 and python3. For details, refer to the popular modules such as flask. Three years ago, when I first went to college, I learned Python as the first language. The teacher stressed that I would download 2.7 instead of 3.x.

I have been using Python 2.7 for three years.

When I helped a school girl change the Project this year, she found that her print result was written as print (result ).

So I realized that it was time to switch to Python 3.

(It is said that the university teaching is out of touch with the industry, and even the University has started to teach Python 3. Do we still have a reason to stay in Python 2 ?) Bru's blog This is a questionnaire about python2 and python3 last year. You can refer to the Python3 big method, which can destroy str every day and leave Python2 safe.
People are doing it, they are watching it day by day, and there are hidden risks in obfuscation of character bytes.
Parameters are out of the box, and function labels are safe.
Sincerely read from import, Python3 legal level security.
All beings come with Enum, and the world is far from evil.
Python3 disciple said the truth and taught you to reject asyncio Mo.
Get rid of u "xxxxx" as soon as possible and get new users as soon as possible.
There is a truth in the "9 rating Python2" search on the Internet. If you
No gevent/twisted/fabric required
Then you can say goodbye to Python 2. Go to his compatibility!

Of course, if you want to build a wheel, you should be compatible... A python3.5.1 group is created. Group number: 220732292.
You are welcome to discuss the issue of version 3.5.1. 500 people come early. Reference "Zen of Python ":

Now is better than never. Although never is often better than * right * now. Use python3 for the next project, but do not change it if it is half written.
If you create a project from scratch, you can do it at any time. At least you can use the web. Currently, fewer and fewer databases support only 2, most of which are compatible with 3. If only 2 is supported, or no update is required, there are also alternatives to support 3, and more packages support py3. If the subject work dependency modules support this feature, it is better to get started early.
If some packages are not supported, py2.7 supports the py3 syntax. You can first convert your code into the py3 style.
After all, it's just a matter of language style. If the internal implementation is not mentioned, the rest of the changes are not very big.

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.