So, I'm fairly proficient at Python, but learned it back in 2.2/2.3 or so and kept up until about 3.5. Lately I have the feeling that 3.7 and particularly 3.8 are game-changers.
Are there any resources to re-learn modern , but assuming that one already knows it?
Just don't feel like going through all the changelogs and PEPs >,<.

@evilham I like this one to merge two dicts

z = {**x, **y}
@tuttle @evilham there is the pipe/update operand `dict1 | dict2` for doing that, overwriting old values. If you want to keep the old values the operand is the merge `dict1 |= dict2`.
That's valid from python 3.9 or 3.8, I don't remember.

@laExpe
Nice! This is the kind of thing I want to be learning, without having someone explain for loops and generators to me :-D
@tuttle

@evilham @tuttle look at the "what's new" section on the python.org website. There is one for every new version of python. Those are not always best practices, though.
Follow

@laExpe @tuttle
I was pointed at this, which is quite exactly what I wanted!

realpython.com/python37-new-fe
(changing 37 for 36/38/39/310 goes to the corresponding python version :-)

· · Web · 0 · 2 · 0
Sign in to participate in the conversation
chaos.social

chaos.social – a Fediverse instance for & by the Chaos community