TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

It's Python, Not Python 2, Not Python 3

22 pointsby gh1over 8 years ago

9 comments

limaover 8 years ago
I fully agree with this sentiment. If you read the discussions, it sounds like Python 3 is an entirely different language which is definitely not the case. Porting code to Python 3 is really easy and involves no changes to the program flow or the APIs you use. Hardest to port is usually the Bytes&#x2F;Unicode transition. In my projects, it fixed a few nasty Unicode bugs which was a nice bonus.<p>&gt; Python 3 came out 2008, at the moment of writing this, it’s almost a decade and if your third party package has not been updated, then it’s really messed up.<p>Exactly. A library which has no Python 3 port in 2016 is going to be an maintenance burden either way, since it&#x27;s not going to get support or security updates either. Many of those abandoned projects have been forked for Python 3 support, and active development continues there.<p>A number of new projects are Python 3-only.<p>Two years ago, I recommended new developers to stick with Python 2 for anything except toy projects (and use __future__ imports to make it easier to port later) because library support just wasn&#x27;t there. Now it is, so it&#x27;s an easy decision.<p>Porting to Python 3 means future-proofing the project - not only Python 2 will be EOL, but many libraries will drop Python 2 support.<p><a href="http:&#x2F;&#x2F;www.python3statement.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.python3statement.org&#x2F;</a>
评论 #13091381 未加载
评论 #13091739 未加载
captainmuonover 8 years ago
So, the problem is that the Python developers - in my opinion unneccessarily - broke backwards compatibility. There are two main problems - the print function, and str&#x2F;unicode. They could just add two or three things, and I&#x27;d be completely satisfied. I hope they are self-descriptive:<p><pre><code> from __past__ import print_statement import unicode_string as str, bytestring as bytes import unicode_string as unicode, bytestring as str from python2 import legacy_module </code></pre> ... or equivalent comment options (a la &quot;coding: utf8&quot;), or iterpreter flags, or something like that. Perl 6 manages to load Perl 5, I don&#x27;t see why this shouldn&#x27;t be possible in Python.<p>Now you might say this is petty, why get worked up by something as minor as the print statement. But just because it is so minor, it feels so unneccessary and petty to remove it.<p>The str&#x2F;unicode switch was also not handled optimally. There is a lot of code still broken. I just ported some code to Python 3 which uses Twisted, and found the FTP implementation does not work in Python3. It turns out this is really hard to fix, because FTP is not encoding aware, and bytestrings &quot;I dont care right now what encoding this is&quot;-strings are second class citizens in Python3.<p>It&#x27;s a bit unfortunate that the Python developers get to decide what is defined as Python and what not. When something gets big, I believe you get certain responsibilites. You shouldn&#x27;t just &quot;break the world&quot; and strand lots of developers in 2008. That they even published a PEP stating there will be no Python 2.8 is silly and mean.<p>To end on a hopeful note: Why won&#x27;t someone make a Kickstarter... if you manage to get full support for loading Python 2 modules into the current, main CPython 3 codebase (upstream), I&#x27;d be willing to pay, say, 100€. I&#x27;m sure some companies with legacy codebases would like to chip in.
评论 #13094448 未加载
dasil003over 8 years ago
Spoken like someone who&#x27;s never maintained a M+ line monolithic codebase.<p>Of course you <i>should</i> upgrade, but an armchair admonishment that papers over the actual costs is just a lot of hot air.
评论 #13092415 未加载
schwarze_pestover 8 years ago
&gt; If you’re on the older version (“Python 2” as you say), you’re a decade behind, you should have upgraded at 2008.<p>Ok, I&#x27;ve stopped reading there.
nardiover 8 years ago
Python Community Still Unwilling to Learn from Mistakes Made in Python 3 Transition
tzsover 8 years ago
&gt; If you’re on the older version (“Python 2” as you say), you’re a decade behind, you should have upgraded at 2008.<p>NumPy didn&#x27;t support Python 3 until release 1.5.0, which came out 2010-08-01.<p>SciPy didn&#x27;t support Python 3 until 0.9.0, which came out 2010-12-12.<p>PyCrypto got Python 3 support in late 2011.<p>Those three alone made switching to Python 3 in 2008 completely unfeasible for a heck of a lot of people.
评论 #13095074 未加载
Demiurgeover 8 years ago
It&#x27;s not the same language. This blog post is flaimbait with zero useful information. Thanks.
qeqover 8 years ago
It starts out saying that it&#x27;s all the same language, then it veers wildly off course to talk about how different they are in saying that Python 3 is way better. Facts are only concrete if and when they are useful.<p>Wonderful.
teiloover 8 years ago
2008. Right. When there was NO library support and major performance issues. Get real. Garbage article.