@Stark9837@Python I got this Usecase too while parsing JSON from the Internet, the data may vary a lot. So .get(key) and test like "if key not in" are common. I don't like .get(key, {}) because it does not notify me when the key is not here which most of the time means something.
Recently, as I've worked on #MastoBot, I have enountered many situations where my code waits, takes a long time to execute, and my main loop is blocked.
With my @3dprinting bot, this only happens on the first run of a clean config, where all previous posts are fetched from the #Mastodon API and stored in a #Redis database The reason is irrelevant, but basically for metrics.
Thus, when the bot starts, it makes about 1.3k requests, one for every post by the bot. This can take about 10 minutes, with the API, paging, network speed, and rate limiting.
During this time, no mentions, new followers, or any other notifications are processed. Then BAM! Everything goes through, and WOW, we are back on track.
@Stark9837@Python that's the easiness of threads that makes me opt for it for the same usecase of multiple HTTP request. Async in Python needs to rework a large part of the code to be really useful.
@vincent If this is correct, you and nitter will be able to fix it isn't it? This war against Open Web must not be lost, that's crucial for our freedom.