gorgeous-minister-4113103/23/2023, 10:10 PM
keyword and pass in an instantiated WhateverArgs class or use each arg from that class in the constructor of the resource? I notice a lot of TypeScript examples have the second parameter be the entire object of args (class), but a lot of python examples use the named keyword arguments of args as part of the resources' constructor arguments...
red-match-1511603/23/2023, 10:43 PM
to multiple constructors. Kinda up to you what path you choose, but I imagine the examples were created before we added on the
way of doing things, which explains why they almost exclusively use kwargs
gorgeous-minister-4113103/24/2023, 5:19 PM
dictionary syntax for unpacking and maybe, mentally, keeps in line with how TypeScript is also passing in these arguments. So maybe, arguably, if you had both TS and Python code bases, using
might keep things consistent from a mental perspective when conjuring up resources. I'll think on whether I want to start using
kw or not.
and so far I like how it feels consistent with the other dialects.. maybe it's not as idomatic python but I prefer the consistency when comparing to the other language dialects.
red-match-1511603/27/2023, 4:28 PM