|
|
Subscribe / Log in / New account

Linux distributions and Python 2

Linux distributions and Python 2

Posted Jun 11, 2018 21:15 UTC (Mon) by Cyberax (✭ supporter ✭, #52523)
In reply to: Linux distributions and Python 2 by remicardona
Parent article: Linux distributions and Python 2

> And that's fine, if you're willing to maintain CPython 2.7 when upstream _finally_ cuts the cord.
It'll be supported by RHEL well into 2027. I don't have to care much about it.

Py3 is not really a different language, it's the same old Py2 with added inconvenience. I've done migrations Py2->3 and haven't found anything worth the effort so far. And I really detest the efforts to force the migration by actively making Py2 more and more inconvenient to use.

Personally, a major motivation for me to finally switch to PyX would be GIL removal.


to post comments

Linux distributions and Python 2

Posted Jun 12, 2018 12:01 UTC (Tue) by hkario (subscriber, #94864) [Link] (1 responses)

> it's the same old Py2 with added inconvenience

that's, like, your opinion, man

seriously, I'd love to drop python 2 to be able to use generators to their full advantage (`yield from` would make my code so much cleaner)

so, sorry, but if you really think that Py3 is just py2 with few "inconvenient" items added then I don't think you can claim to know Py3

> Personally, a major motivation for me to finally switch to PyX would be GIL removal.

well, it won't happen in py2.7, that's certain

Linux distributions and Python 2

Posted Jun 14, 2018 20:12 UTC (Thu) by togga (subscriber, #53103) [Link]

> well, it won't happen in py2.7, that's certain

http://pypy.org

Linux distributions and Python 2

Posted Jun 14, 2018 9:13 UTC (Thu) by LtWorf (subscriber, #124958) [Link] (3 responses)

> it's the same old Py2 with added inconvenience

Something tells me that you never ventured outside of writing English, because in any other language, having strings in unicode rather than ASCII is a huge improvement.

Then, Python3 has type annotations, which lets you use mypy to do some static checks on the code.

I wrote typedload (https://github.com/ltworf/typedload) to load json-like data into typed data structures, so that once loaded, you know your data has the correct types and can be safely be passed around.

My grandmother did not know how to use a computer, that doesn't mean that computers are useless.

Linux distributions and Python 2

Posted Jun 14, 2018 17:21 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

JFYI, my native language is Russian so I’m acutely aware of encoding problems since so many of them were used for Cyrillic scripts. I can speak Ukrainian and understand Polish and Czech. I’d used to be able to speak German but haven’t practiced it in decades and lost most of it. Now I’m also studying Mandarin Chinese for a change.

Static annotations are nice, but are kinda beside the point.

Linux distributions and Python 2

Posted Jun 16, 2018 16:33 UTC (Sat) by lsl (subscriber, #86508) [Link] (1 responses)

Except that Python 2 strings aren't ASCII and support Unicode perfectly well: you just put UTF-8 inside them.

Linux distributions and Python 2

Posted Sep 19, 2019 16:11 UTC (Thu) by LtWorf (subscriber, #124958) [Link]

They work but are very error prone, because characters might take any amount of elements, so you have all sort of issues when doing cycles or manipulation.

With unicode objects, you know that they are not array of bytes and a conversion is needed, and you get an error if you didn't do the conversion that you were supposed to do.


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