08-08-2024 01:21 PM
Does anyone use Python type hints?
08-08-2024 02:23 PM
Haven't used that in all my Meraki projects. I'm familiar with it, but haven't seen the benefits of "complicating" my code. I find it a bit harder to read imo.
08-11-2024 01:49 PM
I'm using it in most of my projects. It helps to understand what to expect from which function.
Really usefull for migrations, when you are e.g. creating an object and in the past it was just some dict/json.
-> So does function xy use the old or the new way? Type hint will let you know 😃
08-11-2024 01:56 PM
So you are using it with human validation only, rather than with external tooling?
08-11-2024 02:01 PM
well I've enabled "basic" type hint warnings in the IDE =D
08-11-2024 02:04 PM
That is another good question. Which IDE do you use?
I tend to use either IDLE or a text editor called UltraEdit (which I use for many other things).
08-11-2024 03:13 PM
Visual Studio & Visual Studio Code depending on the usecase
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide