News for hackers. Stuff that matters.
Re:Top Python libraries of 2020 you should know about by krick on Tuesday December 29, 2020 @10:35PM (#25578160)
Absolutely off-topic, but can somebody advise on the best resource to learn the most up-to-date Python for somebody who is mentally stuck on Python 2.7-3.2? I always referred to Python when I needed to quickly write some tool for personal use, but never professionally, even though I am a professional programmer. And recently while writing something like this I was struck with how bad my Python actually is in 2020, compared to how other languages I know currently look. Quick lookup shows that it seemingly has pretty powerful typehints system now, but I never used it. I have no idea, which parts of standard library you aren't supposed to actually use anymore, and use some well-established 3rd part library instead (like it was with requests). And stuff like that. And is it even a good idea, to finally switch to the newest versions of Python and to never look back?

So, basically, what's the best way to catch up?

Re:Top Python libraries of 2020 you should know about by ghshephard on Tuesday December 29, 2020 @10:45PM (#25578232)
I"d strongly recommend Trey Hunner at PythonMorsels. The approach is to give you a concise problem that should exercise some part of your python knowledge, and have you write code, re-write your code, bang your head against a problem, and then, once you've written something that passes all the unit tests, you get a walk through possible solutions by someone who knows python well.

Trey starts with a description of how you might solve the problem (which is about how I solved the problem 50% of the time) that is almost always clearly wrong, even though it "works" - then he shows you a somewhat more pythonic and modern way - and you go, "aha!", and then, he shows you the elegant solution - and it changes your life, and you use that pattern in everything you write.

His focus though, is really on how to write clean pythonic 3.x code more than the latest and greatest features, but he tags his problems/solution sets, so if you really want to dive into decorators, or context managers, or dunder methods - you can zoom right in.

The only problem I've had with Python Morsels is I look at the code I wrote a year ago (I'm not a developer) and I'm embarrassed and ashamed at how gross it was.

Re:Top Python libraries of 2020 you should know about by rvdmei on Wednesday December 30, 2020 @04:34AM (#25580113)
Just build something you need (or just a simple To Do app) and use a modern library / framework that uses the “new” stuff. I can highly recommend to give FastAPI a try. Even just going through the examples in the docs (amazing docs) should get you started.
Re:Top Python libraries of 2020 you should know about by Doxin on Thursday December 31, 2020 @08:25AM (#25592437)
> So, basically, what's the best way to catch up?

Install the latest python version and use it. Ignore the bits you don't need. The type hints for example are neat but entirely optional.