Earlier quoted context omitted.
I say this as someone who uses the latest version of Python available in every new project or script. Text encoding issues are absolute garbage in Python 3.x I fucking hate the way that csv module works with text encodings. As soon as I can figure out a reliable way to take latin-1 and save it as UTF-8 without breaking everything, I will try to shoehorn in a PR. Right now, it's fucking awful. My ETL pipeline hates it…
with open('some latin-1 file', 'rb) as f: text = f.read().decode('latin-1') with open('some utf8 file', 'wb') as f: f.write(text.encode('utf-8')) Python 3's string encoding support is super good. I've said it before and I'll say it again: if you use bytes as a string you are Doing It Wrong. If you use bytes as a string you are Doing It Wrong. If you use bytes as a string you are Doing It Wrong.
Why I'm Making Python 2.8
301–310 of 392 posts
Re: Why I'm Making Python 2.8
#302Python programmers and companies with python code should spend the time and effort to move to python 3 instead of spending that time and effort to backport stuff to python 2 because python 2 is deprecated and the future is python 3. Python 3 I think people and businesses with python 2 code would be better off moving their code bases to python 3 instead of doing things like this.
Re: Why I'm Making Python 2.8
#303Earlier quoted context omitted.
I say this as someone who uses the latest version of Python available in every new project or script. Text encoding issues are absolute garbage in Python 3.x I fucking hate the way that csv module works with text encodings. As soon as I can figure out a reliable way to take latin-1 and save it as UTF-8 without breaking everything, I will try to shoehorn in a PR. Right now, it's fucking awful. My ETL pipeline hates it…
I don't see the problem; reading and writing different encoding works fine. The CSV module makes no problems either: in_file = open("in.csv", 'r', encoding='latin-1') in_csv = csv.reader(in_file) out_file = open("out.csv", 'w', encoding='utf-8') out_csv = csv.writer(out_file) out_csv.writerows(row for row in in_csv)
The resulting file is not readable, and it makes me want to kick puppies and punch kittens.
Re: Why I'm Making Python 2.8
#304Earlier quoted context omitted.
> And also from not being connected to actual business and end user needs. I am not really personally bothered by Python 3 being incompatible (with that one Jython exception that I already mentioned). But I would like to point out the comment https://news.ycombinator.com/item?id=13146127 , I think you're the one who is wrong here. > It's more likely that Python will suffer from people moving to other languages Unlike…
Go and Julia are already reaping the benefits. I see no future for Python be that 2 or 3. It's not great at anything, but projects a veneer of friendliness (that one should quickly outgrow) on top of a pile of bad implementation decisions and terrible design. Its popularity is based on superficial attributes rather than solid foundations. Eventually, the entire ecosystem will collapse and the masses will flood to the…
Go is interesting, but really a different (and perhaps smaller) use case. What, for instance, I do in Python? That little one-off script that converts one thing to another or calculates something - I am not sure why I would even bother thinking about Go.
I have no doubt that at some point, Python will be replaced by something. But I don't think it will be any of the languages that are currently in widespread use. Heck, C is also not based on solid foundations (I mean like type theory or something), and it wasn't fully replaced yet.
Re: Why I'm Making Python 2.8
#305Earlier quoted context omitted.
> Python programmers and companies with python code should spend the time and effort to move to python 3 instead of spending that time and effort to backport stuff to python 2 because python 2 is deprecated and the future is python 3. I hate Python 3's removal of the (lambda (key, value): blah) tuple unpacking syntax, and the forcing of parentheses for print statements. They might seem minor but they aren't for me. S…
Benefits? Unicode. Async. Extended library. Required keywords. syntax inprovements (lots of m, many more than just the removal of the print statement). Type hinting.
Re: Why I'm Making Python 2.8
#306> And the majority of Python code written does not run under any of the 3.x interpreters. This makes it harder for its users to be productive. What a load of bollocks. For new projects this only matters if libraries aren't ported, which they are for the most part. For old projects, either you're in a situation where you can spend time porting your code to Python 3, or you don't; but as TFA mentioned pep-404, the writ…
Re: Why I'm Making Python 2.8
#307> And the majority of Python code written does not run under any of the 3.x interpreters. This makes it harder for its users to be productive. What a load of bollocks. For new projects this only matters if libraries aren't ported, which they are for the most part. For old projects, either you're in a situation where you can spend time porting your code to Python 3, or you don't; but as TFA mentioned pep-404, the writ…
While I wish Naftali well in his efforts - I have a private Python-derived language myself! - this is not "Python 2.8." For trademark purposes, "Python" is only what is released or endorsed by the PSF.
We have already reached out to Naftali and asked him to change the name of his project and update this blog post accordingly.
Obviously, though, this is someone who cares a lot about Python, so let's be sure not to rain down on him with a lot of scorn; I admire that he was willing to sit down and 'scratch his own itch.'
Source: I am the General Counsel of the PSF.
Re: Why I'm Making Python 2.8
#308Earlier quoted context omitted.
There are numerous metrics out there showing that Python 2.7 is far more ubiquitous than 3.x Here is one recent one: http://www.randalolson.com/2016/09/03/python-2-7-still-reign... If you have counter statistics showing that Python 3.x is more popular than 2.7 I would very much like to see them.
Nice to break down FIVE 3.x versions vs TWO 2.x versions. Stack them up and let's count again.
2.7: 10 million (M)
2.6: 0.5 M
---
3.5: 1 M
3.4: 0.750 M
3.3: 0.05 M
3.2 and 3.1 too low to make a difference.
-------
So totals:
Python 2.x: 10.5 M
Python 3.x: 1.8 M
---
Python 2.x is waaaaay ahead over 3.x
Re: Why I'm Making Python 2.8
#309As others have said, maybe this project fixes some actual problems and backports some features from 3, but this isn't "Python". Beyond the fact that Python is a trademark of the Python Software Foundation, Python is more than the language, it's the community and the tools (as with every programming language). So while there are some vocal people that really dislike Python 3 (either in part or wholly), my understandin…
I don't know about that. It forked a Python compiler, and is fully interoperable with 100% of Python 2 code, and much of Python 3 code. It's even compatible with Python C extensions. Why isn't it a valid Python compiler? To me, the whole morass about trying to end-of-life Python 2 is a bit silly. People have gotten emotional about the situation. On one side, people like Zed Shaw are calling the Python maintainers 'ev…
My biggest gripe with this project besides calling this Python is that it's seemingly ambiguous with its code compatibility. I don't mind ambiguity in programming languages, but generally the ambiguous cases are explicitly defined with cases to explain them, and I don't see anything of that nature here, only something that vaguely says that if there's something that works in both the Python 2.7 way will be the default. Without defining those it's hard to know what could happen in an edge case and this could introduce specific bugs that don't present themselves immediately but introduce data weirdness because the cases where something may be ambiguous wasn't defined.
In any case, I think that if a company has a really big, maintained code base in Python 2, it's their fault for supporting an older, in-2020-unsupported version of a programming language and the money/developer time spent supporting the codebase could be spent transitioning it to Python 3. I can understand a little more with an open source project because time is more precious and generally that time is donated, but even then most bigger projects (Numpy, Scipy, Django) have moved to Python 2/3 compatibility so unless the project is gargantuan there's no real excuse besides the project is not maintained.
Re: Why I'm Making Python 2.8
#310Earlier quoted context omitted.
I don't want the CPython core devs to do anything different and are not angry with them at all. It is their pet and they can do what they want. I fully agree with what you say in that sense. But I do mind people saying in these discussions "you should all move to Py3 now or you are stupid/evil". No. There are legitimate reasons for staying with Py2.7 and embracing it. So I hope "Python 2.8" gets a cool name, perhaps…
> I don't want the CPython core devs to do anything different It's not just CPython, it's the Python specification of which CPython is the reference implementation. The specification couldn't move forward in significant ways without making some of the changes that came with Python 3. > All I want is for people who I think have a huge blind spot to stop calling me ignorant The level of vitriol in 2vs3 threads has been…