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
Past
November 2023
- PyCon Ireland 2023, 11-12th
- PyData Tel Aviv 2023 14th
October 2023
- PyConES Canarias 2023, 6-8th
- DjangoCon US 2023, 16-20th (!django 💬)
July 2023
- PyDelhi Meetup, 2nd
- PyCon Israel, 4-5th
- DFW Pythoneers, 6th
- Django Girls Abraka, 6-7th
- SciPy 2023 10-16th, Austin
- IndyPy, 11th
- Leipzig Python User Group, 11th
- Austin Python, 12th
- EuroPython 2023, 17-23rd
- Austin Python: Evening of Coding, 18th
- PyHEP.dev 2023 - "Python in HEP" Developer's Workshop, 25th
August 2023
- PyLadies Dublin, 15th
- EuroSciPy 2023, 14-18th
September 2023
- PyData Amsterdam, 14-16th
- PyCon UK, 22nd - 25th
🐍 Python project:
- Python
- Documentation
- News & Blog
- Python Planet blog aggregator
💓 Python Community:
- #python IRC for general questions
- #python-dev IRC for CPython developers
- PySlackers Slack channel
- Python Discord server
- Python Weekly newsletters
- Mailing lists
- Forum
✨ Python Ecosystem:
🌌 Fediverse
Communities
- #python on Mastodon
- c/django on programming.dev
- c/pythorhead on lemmy.dbzer0.com
Projects
- Pythörhead: a Python library for interacting with Lemmy
- Plemmy: a Python package for accessing the Lemmy API
- pylemmy pylemmy enables simple access to Lemmy's API with Python
- mastodon.py, a Python wrapper for the Mastodon API
Feeds
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
@ericjmorey any guide that even mentions Python 2 is probably outdated and should be met with caution.
Thank you for your words of caution. I've copied below what the author has to say about Python 2 vs Python 3:
Picking a Python Interpreter (3 vs 2) — The Hitchhiker's Guide to Python
.
The State of Python (3 & 2)
When choosing a Python interpreter, one looming question is always present: “Should I choose Python 2 or Python 3”? The answer is a bit more subtle than one might think.
The basic gist of the state of things is as follows:
1 - Most production applications today use Python 3.
2 - Python 3 is ready for the production deployment of applications today.
3 - Python 2 reached the end of its life on January 1, 2020 [6].
4 - The brand name “Python” encapsulates both Python 3 and Python 2.
Recommendations
I’ll be blunt:
Use Python 3 for new Python applications. If you’re learning Python for the first time, familiarizing yourself with Python 2.7 will be very useful, but not more useful than learning Python 3. Learn both. They are both “Python”.
So…. 3?
If you’re choosing a Python interpreter to use, I recommend you use the newest Python 3.x, since every version brings new and improved standard library modules, security and bug fixes.
Given such, only use Python 2 if you have a strong reason to, such as a pre-existing code-base, a Python 2 exclusive library, simplicity/familiarity, or, of course, you absolutely love and are inspired by Python 2. No harm in that.
Further Reading
It is possible to write code that works on Python 2.6, 2.7, and Python 3. This ranges from trivial to hard depending upon the kind of software you are writing; if you’re a beginner there are far more important things to worry about.
@ericjmorey Why are you copying part of an article you've already linked to? I'm not sure what your point is.
My point is very simple: don’t spend any time on even considering Python 2. The fact the author spent so much time on it shows it's quite an old guide. (The dates in the git repo confirms this.)
The resource is about exactly this type of information. It's not a resource that contains code examples. It has concisely presented information about things that aren't in the Python documentation or is overly technical and verbose in the documentation. It's a stepping stone providing context to getting more (and more current) resources.
@ericjmorey Except it's outdated. Here, I'll write a new paragraph for you: "When you start to learn Python, start with Python 3.10. If you at some point come across an codebase using older versions, you'll have learned enough to get to grips with the differences outlined in Python documentation." There, that's all you need to know.
What is outdated exactly? How has it bee useful to me while still being outdated?