Python3 VS. Python2

Usually we upgrade and change the software version of all the devices weather its computer OS or gaming console or Cellphone or any other devices whenever its’ require. Programming language also not exception for this.

The is many reason for upgrading the software version

  • You’ll miss out on new and exciting features.
  • To reduce vulnerabilities.
  • To fix bugs and crashes.
  • To ensure compatibility with other updated technologies.
  • Innovate to stay ahead of your competition.

In 2008 Creator of python call Guido van Rossum unhappy about the python internal architecture. So create a new version by modifying exciting python internal architecture, His expectation was to make very user friendly architecture and people to get adopt easily to the environment but actually it’s not backward compatible.

What’s mean backward compatible?

Backward compatible refers to a hardware or software system that can use the interface of an older version of the same product.

A new standard product or model is considered backward compatible when it is able to read, write or view older formats. Because of this took lot of time for a lot of companies to get migrate to python3

Python2

Python3

It’s still entrenched in the software certain Companies

It will take over python 2 by 2020

Many older libraries built for python 2 are not forwards-compatible

Many of today’s developers are creating libraries strictly for use with python 3

String are stored as ASCII by default

Text string are Unicode by default

It rounds your calculation down to the nearest whole number

The expression 5/2 will return the expected result

Python 2 print statement

The print statement has been replaced with a print() function

Why we want to learn python?

  • It is fast and Powerful
  • Plays well with other
  • Runs everywhere
  • It is easy to learn. (That means you can learn it even if your adventure with programming has just began)
  • It is friendly (Credit goes to all those community hosts conferences, meet-ups, collaborates on codes and etc)
  • Perfect for Rookies
  • Community
  • Career Opportunities

Why we should python3 over python2

  • Iterators, generators (Many lists that would have been in memory lists with 2.7 are generators in Python 3. This make high memory functions much more efficient. There are some disadvantages, but I won’t go into detail here.).
  • True UTF8 support - all strings are utf8 by default (Huge win!)
  • New features will be added to Python 3
  • It is not 7 years since the last release

Why we shouldn’t python3 over python2

Some libraries have not yet been migrated over to support Python 3. This is a huge problem for some people that have code written to rely on these libraries.

However, it is my opinion that if the library isn't popular enough to demand a Python 3 version then it may not be necessary. That or get with the game people.

I should note that it has been years since I ran into a library that I wanted to use that didn't work in Python 3.

Conclusion

Use Python 3 unless you absolutely have to use Python 2 for some reason. Python 3 is faster and better supported. All the solutions I share on Scripting with Python are written with Python 3 first in mind. I may occasionally test them with Python 2 but I won't guarantee it.

About Author

Myself KarthiQ, I am the author of this blog, I know ways to write a good article but some how I donot have the skills to make it to reach people, would you like help me to reach more people By sharing this Article in the social media.

Share this Article Facebook
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions

Copyright © CherCher Tech