this post was submitted on 06 Oct 2023
18 points (87.5% liked)

Python

6955 readers
13 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 2 years ago (1 children)

I think the biggest problem would be libraries which are not available in 3.x. I just rewrote a python script some time ago and the syntax changes were pretty easy to change with search and replace.

[–] [email protected] 6 points 2 years ago (1 children)

I don't see a problem. For one, it's been 15 years: the vast majority of libraries have been ported by now. And like you said, you can fix the syntax with basically a find/replace script, so any stragglers can be modified easily.

There really isn't any excuse to still be using Python 2 anymore

[–] [email protected] 5 points 2 years ago

While I agree that people should have moved on for a while, the idea that porting Python 2 to 3 only involves "find and replace" or a tool like 2to3 is only true in the most trivial cases. Anything that touches bytes, unicode, network or files to do anything remotely involved needs a lot more care. I should know, our codebase still suffers from the occasional bug due to this, even though it's been years.

[–] [email protected] 2 points 2 years ago (1 children)
[–] [email protected] 1 points 2 years ago

At the old job I was using IronPython (2.7) to write Grasshopper plug-ins in the Rhino CAD software. Luckily, it was mostly responsible for kicking off Python3 and Go subprocesses.

Now, the worst I’m stuck with is 3.8 for one of our repos using PyTorch.

[–] [email protected] 1 points 2 years ago

yeah. my pain exactly. the only thing that keeps me well is 3.12 in my personal projects.