Conversation
Yeah, stick to f-strings. The %-based formatting is a legacy feature they probably should have removed in Python 3 and f-strings are a fairly recent addition improving further on the past approaches. It's one of the issues with having a language that keeps evolving.
1
1
A huge portion of the standard library should be mostly avoided at this point, since there are much better third party libraries like requests that are essentially treated as the standard library. Inclusion in the standard library dooms a module to becoming out-of-date / archaic.
1
The customer I'm working for requires _only_ using python 3.6's base libs.
1
The requests and urllib3 would definitely be in the standard library if only the people involved didn't think it would be a terrible result for the modules. A major issue is that people get stuck with older Python versions, the release cycle is slow and it's hard to evolve.
2
I mean requests is *done* at this point. So why not standardize it?
1
It's also just one of many examples. I feel like a lot of the standard library is complete garbage at this point. It feels a lot like verbose Java when it really doesn't have any real reasons to be like that. Lots of 3rd party alternatives with better ergonomics/functionality.
1
1
I have to agree that the stdlib has a lot of surprising bits. The other day I needed to created to make a tarfile in memory...and like, there’s a tarfile module in base?
1
docs.python.org/3/library/dbm. is one of the worst modules. It's non-portable and these are completely terrible even as key-value databases. They don't have modern approaches to transactions, locking, concurrency, etc. I think it's pretty rare for people to even use dbm nonsense in C.
Since it has a prominent place in the Python standard library, it's almost like the Python standard library is promoting using it. The same goes for the fairly horrifying Tk GUI toolkit: docs.python.org/3/library/tk.h. I mean seriously, it didn't use antialiased text before 8.5 in 2016.


