Okay #python people - I know there are lots of you on fosstodon.
I’ve worked with Python professionally a few years back, and on my own projects occasionally, but now I’m wanting to get back to a true ‘flow’ state with the latest and greatest (ignoring packaging, as that’s always a mess).
Any suggestions as to where best to catch myself up, and see what I’ve missed ?
No ‘beginner’ things please, as I’ve been around a long time, but any cool/useful/important things from 3.6 onwards I guess.
@mobiuscog what niche are you looking into? Python does a lot of things and loads of changes in the past few years!
To start `pyright` is the new `mypy` for type checking. Pydantic is much better now and more pythonic. Asyncio rules everything. With all of that there are many very powerful typed and asynchronous packages like fastapi, litestar and starlette.
For packaging `pyproject.toml` is standard so more packaging options: poetry or uv
`ruff` is the linter.
also `pathlib` is amazing.
@mobiuscog Each Python release has a “New in version ___” doc… maybe that’s a good starting point? Depending on what your focus is, there are a number of good changes. Recommend looking into changes around type hinting, pathlib, and language features like structured pattern matching (match case) and the walrus operator.
@mobiuscog Also, I did a talk at #PyOhio this last weekend on Pathlib. Once it goes live on YouTube or PyVideo, I can recommend it as a good intro to pathlib.
@mobiuscog In Python itself: walrus operator, type annotations. Outside of Python: Ruff.
@mobiuscog Being able to create classes with less boilerplate (dataclasses/attrs/pydantic)
@mobiuscog dataclasses (3.7), the nice way they interact with structural pattern matching (3.10) and the steady improvements in "importlib" which bring more packaging infra into the stdlib, for me.
@mobiuscog try writing a pet project with async/await. I've done that recently, it was a lot of fun and learning.
@mobiuscog Oh yeah, and the move away from setup.py. I like how you can create a package with a minimal pyproject.toml file: https://gist.github.com/Chris-May/d5e8ab18c062b295237ad6da9ca9dbb9#file-pyproject-toml