gorgeous-minister-41131
03/23/2023, 10:10 PMargs=
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-15116
03/23/2023, 10:43 PMArgs
to multiple constructors.
Kinda up to you what path you choose, but I imagine the examples were created before we added on the WhateverArgs
way of doing things, which explains why they almost exclusively use kwargsgorgeous-minister-41131
03/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 args
might keep things consistent from a mental perspective when conjuring up resources.
I'll think on whether I want to start using args
kw or not.gorgeous-minister-41131
03/24/2023, 10:45 PMargs=WhateverArgs()
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-15116
03/27/2023, 4:28 PM