|
|
Subscribe / Log in / New account

Revisiting PEP 394

Revisiting PEP 394

Posted Mar 8, 2019 12:39 UTC (Fri) by moltonel (guest, #45207)
In reply to: Revisiting PEP 394 by Cyberax
Parent article: Revisiting PEP 394

> The thing is, Py2->3 porting does not give you any advantages. Py3 code is not safer or more concise, it doesn't provide you any new powerful abstractions. And for a long time it had been quite often slower than Py2 (it's _mostly_ fixed now).

I guess your python2 code never had an issue with text encoding ? Perhaps you were very careful to do all the correct calls where needed, or perhaps you were lucky with your input data. It's much harder to get things wrong with python3. To me that was py3's biggest selling point, but other people will have different favorite features (including some making code more concise or performant).

Also, it's unfair to complain that removal of deprecated stuff doesn't yield improvements on day 1. It takes time to take advantage of the cleaned up code. For example removing support for classic classes doesn't bring anything by itself, but it opens the door to improvements down the road.


to post comments

Revisiting PEP 394

Posted Mar 8, 2019 17:52 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

I never had an encoding problem with Py2. And yes, I’ve been using it for non-ASCII languages. The key is to stroke all strings in UTF-8 and suddenly all encoding issues disappear.

Revisiting PEP 394

Posted Mar 8, 2019 19:51 UTC (Fri) by mirabilos (subscriber, #84359) [Link]

While I admit I didn’t have *more* encoding problems with py3k than with Python, they were _much_ easier to fix in Python, while py3k tried too hard to do the thing it thought was right.

Some of the recent fixes will help, though.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds