Re:Python Type Hints – *args and **kwargs
by icedchai on Sunday August 27, 2023 @11:18AM
(#37283491)
I once worked on a code base where we had *kwargs passed down 4 or 5 layers deep (not my idea.) It was a true joy.
[ Parent
| on HN ]
Re:Python Type Hints – *args and **kwargs
by akasakahakada on Sunday August 27, 2023 @11:29AM
(#37283603)
This is literally me. It is a math program that can evaluate equations and generate code. 6 layers of heterogeneous data structure which the math operation being act on 1st layer has its effect down to 6th layer. Temporarily using *kwargs to make it works but still thinking what is the proper way to do it right.
Re:Python Type Hints – *args and **kwargs
by crazydoggers on Sunday August 27, 2023 @12:13PM
(#37284034)
Can you organize the data structures into classes or dataclasses?
Re:Python Type Hints – *args and **kwargs
by akasakahakada on Sunday August 27, 2023 @12:34PM
(#37284244)
Already doing this. The problem is there are 5 layers in between. Copy and paste the same docstring into all layers is doable but do not seem smart.
Re:Python Type Hints – *args and **kwargs
by c32c33429009ed6 on Sunday August 27, 2023 @12:13PM
(#37284035)
Out of interest, what sort of company/industry do you work in where you're able to work on this kind of thing?