this post was submitted on 30 Nov 2023
21 points (92.0% liked)

Python

5396 readers
1 users here now

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

📅 Events

October 2023

November 2023

PastJuly 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
[–] [email protected] 0 points 11 months ago (10 children)

@ericjmorey any guide that even mentions Python 2 is probably outdated and should be met with caution.

[–] [email protected] 4 points 11 months ago (4 children)

Any dev who pretends Python 2 doesn't exist should probably look around a bit more. Damn legacy code.

[–] [email protected] 1 points 11 months ago (3 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.

[–] [email protected] 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.

[–] [email protected] 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?

[–] [email protected] 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.

load more comments (1 replies)
load more comments (1 replies)
load more comments (6 replies)