When should I turn from Python2 to Python3?

Source: Internet
Author: User
I write a lot of things in python with a moderate level of coding
However, in the current demand, a large number of packages are supported by Python2. So now it's basically coding on the Python2.
Always feel that you should learn Python3 but do not know when to turn to it more appropriate. Do you have any comments?

Reply content:

From now on, make your code compatible with both Python2 and Python3, with reference to popular modules such as flask. Three years ago, when I first entered the university, I learned the language of Python, the teacher stressed to download 2.7, not 3.x.

Three years to help learn younger brother to change the Python job, has been using Python 2.7.

This year to help a school girl to change project, found her print result written in print (result).

So I realized that it was time to consider turning Python 3.

(All the things that college teaches are out of line with the industry, even universities are starting to teach Python 3, do we still have a reason to stay in Python 2?) Bru ' s Blog This is done last year on the Python2 and Python3 A survey of the landlord can refer to the Python3 Dafa good, the day off str, back Python2 security.
People are doing, days looking, confusing character bytes leaving hidden trouble.
Parameters of the world out of chaos, function labels to protect peace.
Sincere read from import good, Python3 Dafa ping bao.
All sentient beings are the enum, the present sinister forgetting frontier.
Python3 Disciple said the truth, teach you Asyncio mo refuse.
get rid of U "xxxxx" Early and get new life soon.
Internet search "Nine comments Python2" have the truth. If you
No gevent/twisted/fabric.
Then you can say goodbye to Python 2. Go for his compatibility!

Of course, if you want to build a wheel, still good compatibility ... A group of python3.5.1 was built. Group number: 220732292.
Welcome to Pythoner to Exchange 3.5.1 version of the issue. 500 people come early in the morning. Quote "Zen of Python":
Now is better than never.Although never is often better than *right* now.下个项目就用python3吧,但是写了一半快写完的就别改了。
If you do the project from scratch, you can do it at any time, at least for the web. Now only support 2 of the library is getting less and more, most of them are beginning to be compatible with 3, if only support 2, or is not updated, or there is a support for the replacement of 3 more and more packages support PY3, if the main work depends on the module has support, early turn early good.
If there are unsupported packages, py2.7 supports PY3 syntax, you can first turn your code into PY3 style.
After all, it's just a language-style problem, and the rest of the change is not too big.
  • 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.