Home  >  Q&A  >  body text

现在一般使用python3还是python2?

现在一般使用python3还是python2?

PHP中文网PHP中文网2741 days ago1304

reply all(28)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 15:43:12

    If the library you depend on only supports 2, -----------> use 2
    If you like to pursue new things,------------>Use 3
    If you have played 2 before and now want to play 3, --------> 2 to upgrade to 3 (refer to the link below)
    http://woodpecker.org.cn/peintopython3/porting-code-to -python-3-with...

    According to the completeness of **, what 3 can do, 2 can also do, and what 2 can do, 3 can do better.

    If you are a Virgo and are too confused, you might as well change to a language with no version differences,

    According to the completeness of **, if python can do it, *** can also do it, and it may even do better.

    reply
    0
  • 阿神

    阿神2017-04-17 15:43:12

    It depends on the demand. Some modules such as twisted do not support python3. 2.7 is now mostly supported. If you cannot use a few modules that do not support 3.x, it is recommended to use 3

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 15:43:12

    Python3 has stricter syntax and more plug-ins

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 15:43:12

    I am currently using python2. If I plan to write another server, I will take a look at python3

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 15:43:12

    I’m still using 2, I don’t know why, I’m too lazy to change it

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 15:43:12

    Python 2.7 is partially compatible with Python 3, which is a compromise.

    reply
    0
  • PHPz

    PHPz2017-04-17 15:43:12

    Generally, Python 2.7 is installed on Linux systems

    reply
    0
  • 阿神

    阿神2017-04-17 15:43:12

    If you don’t have any historical baggage, just use 3 decisively. I wrote a lot of code for 2 before, but I have no choice but to use 2. Most commonly used libraries now support 3.

    reply
    0
  • Cancelreply