> I've left this one to the bonus section because I've never used set operations on Counters and I'm finding it extremely hard to think of a use case for xor specifically. But I do appreciate the devs adding it for completeness.
Check out symmetric difference
Thread safe ittertors? really are we still on these topics
lazy from typing import Iterator
def stream_events(...) -> Iterator[str]: while True: yield blocking_get_event(...)
events = stream_events(...)
for event in events: consume(event)
I was so into Python for 10 years, was enjoyable to work in. But have deleted 100k+ lines this year already moving them to faster languages in a post AI codebot world. Mostly moving to go these days.
It's nice that python 3.15 added Iterator synchronization primitives: https://docs.python.org/3.15/library/threading.html#iterator.... These will nicely complement my threaded-generator package which is doing just this but using a thread/process+generator+queue: https://pypi.org/project/threaded-generator/
There's a good interview about Python internals and management, particularly in relation to free-threading: https://alexalejandre.com/programming/interview-with-ngoldba...
funny how we may have to wait even longer for llms to pick up this update in their pre-training
I am not a python dev but have the utmost respect for the ecosystem.
But damn, with all the supply chain attacks now in the news, could they just make a simple way (for non python insiders) to install python apps without fearing to be infected by a vermin with full access to my $HOME ...
From this example:
Do we finally have "lazy imports" in Python? I think I missed this change. Is this also something from Python 3.15 or earlier?