zlacker

[return to "Show HN: WakaQ - a Python distributed task queue"]
1. hannib+5g[view] [source] 2022-09-06 00:18:37
>>welder+(OP)
I really like the overall design and ethos, but a new project without typehints, pydoc, and at least some tests just isn't the kind of thing I'd bring into my stack. Hope it gets a little bit of polish!
◧◩
2. welder+fi[view] [source] 2022-09-06 00:35:58
>>hannib+5g
It does have some typehints... but I don't like Python types when they require importing the object only for the purpose of types. I only import objects when they're actually used in the non-type code, and I don't like to use `if typing.TYPE_CHECKING`.

These days I use Go when I need types.

◧◩◪
3. ttymck+9r[view] [source] 2022-09-06 01:50:29
>>welder+fi
Why is this a problem? When would you reference the type but not actually need the type? If you're returning the type from some method in your API, but not instantiating it there?
◧◩◪◨
4. welder+1N[view] [source] 2022-09-06 05:03:34
>>ttymck+9r
Yes, if you're accepting the type as a param or returning the type. It happens very frequently, and without moving those imports behind "if typing.TYPE_CHECKING", you constantly run into cyclic imports.

https://stackoverflow.com/questions/39740632/python-type-hin...

[go to top]