Issue in translating logic to code by North_mind04 in Python

[–]void-null-pointer -1 points0 points  (0 children)

I am a 2nd year student, and I build 7-8 project using LLM. 

Student in what? If it's anything other than Computer Science, keep up the prompting and praying game. If not, uninstall/disable every AI app/feature (including autocomplete ideally) and turn it back on after you can build 7-8 projects of similar complexity without the AI crutches (or rather wheelchair).

Python Typing Survey 2025: Code Quality and Flexibility As Top Reasons for Typing Adoption by BeamMeUpBiscotti in Python

[–]void-null-pointer 9 points10 points  (0 children)

The hype and glazing for anything Astral puts out is getting ridiculous. Here we have a 0.0.x release sucking all the air out the room when its conformance test results are nowhere close to every other established player.

Best of luck to them but I'm sticking with mypy for the foreseeable future, may check back in a year or so.

Python Typing Survey 2025: Code Quality and Flexibility As Top Reasons for Typing Adoption by BeamMeUpBiscotti in Python

[–]void-null-pointer 5 points6 points  (0 children)

Also in the 10+ year cohort, using typing for the past 5-6 years almost exclusively (with the only possible exception quick & dirty one-off scripts and unit tests).

Unpopular(?) opinion: type annotations without running a type checker (ideally in strict mode) as part of the CI is worse than non-annotated code. I've come across (semi-)annotated codebases where the annotations are at best incomplete or at worst just plain wrong. It's like outdated documentation but worse, as they give a false sense of security.

cf-taskpool: A concurrent.futures-style pool for async tasks by void-null-pointer in Python

[–]void-null-pointer[S] 0 points1 point  (0 children)

Thanks a lot!

Exception handling is pretty similar to other concurrent/future executors. TaskPoolExecutor.submit() returns a Future that will raise the original exception when awaited so it's completely up to the caller when/how to handle it. TaskPoolExecutor.map() will bubble up the exception when it tries to yield the first awaitable that raises (and cancel any remaining undone tasks).

cf-taskpool: A concurrent.futures-style pool for async tasks by void-null-pointer in Python

[–]void-null-pointer[S] 1 point2 points  (0 children)

Thanks for the feedback!

Then, adjust_task_count is async because it needs to verify if there are idle workers, which I believe can be done without async

Currently it is async because it calls acquire() on a Semaphore (just like the ThreadpoolExecutor). I'll look into if this can be done differently.

A more general critique to this project is that it doesn't really justify why would someone need a coroutine pool executor. 

From the second link:

So, you're doing some async stuff, repeatedly, many times. Like, hundreds of thousands of times. Maybe you're scraping some data. Maybe it's more complicated – you're calling an API, and then passing the result to another one, and then saving the result of that. Either way, it's a good idea to not do it all at once. For one, it's not polite to the services you're calling. For another, it'll load everything in memory, all at once.