this post was submitted on 30 Nov 2023
10 points (85.7% liked)

Python

6347 readers
1 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 1 year ago
MODERATORS
 

I'm pretty new to Python and discovered the nicely presented PEP8 coding style guide linked in the post. Stumbling onto The Hitchhiker’s Guide to Python! has been a very helpful compliment to the official Python Documentaion

Hopefully this post will help others getting familiar with Python.

you are viewing a single comment's thread
view the rest of the comments
[–] jeremyparker@programming.dev 1 points 11 months ago (1 children)

Seconding this. For someone that doesn't know anything about Python, there are vital aspects of Python 2 that need to be covered.

In the context of learning a language, most of the time, a lower version number doesn't mean that much. In the case of Python 2, there are fundamental incompatibilities - and, as you say, it's still out there, and when your see it, you need to know what that means.

Maybe you don't choose a library or a piece of software if you notice it. Maybe you get a legacy code base dumped on your lap. This shit happens.

[–] twoframesperminute@mastodon.social 3 points 11 months ago (1 children)

@jeremyparker Those are all valid. But not in a starter guide for someone looking to learn a language. If and when you get submerged into a legacy project you have all the time to find out what's what. But teaching someone outdated syntax and features just because they *might* come accross them maybe is a terrible way to teach.

[–] twoframesperminute@mastodon.social 1 points 11 months ago (1 children)

@jeremyparker Note that for people new to a language it's much harder to distinguish between old and new than someone already familiar with the old. Don't push old on people starting out.

This is starting to feel like arguing kids should learn Latin because it might help them understand medical terms better. Sure, that's true, but a) it's only useful for a small subset of learners and b) is it worth the effort to learn an entire language just for some minor details?

[–] twoframesperminute@mastodon.social 1 points 11 months ago

@jeremyparker As for myself: I use Python as a scientist on an almost daily basis. I've never learned anything about Python 2, have never touched it and never required it. Maybe if you work in a field with tons of legacy code it's useful, but I and all my colleagues are working with Python 3.7 or newer (mostly 3.10 and newer) only. There is no single argument you could make that would convince me I or any of my colleagues should know *anything* about Python 2.