3 ms·
For some languages it’s a whole lot more important than others. Python and JavaScript are memory-safe so you don’t need to worry about writing a bigger object i
by IgorPartola 4y ago
For some languages it’s a whole lot more important than others. Python and JavaScript are memory-safe so you don’t need to worry about writing a bigger object into a too-small memory allocation.
You will discover that you reversed the order for parameters to a function by running your code with much less effort than annotating all your code. This type annotation is entirely useless:
def get_user(email: str, create_if_not_exists: bool)
- pfdietz 4y agoAdditionally, if you are testing the code anyway for other reasons (like, to check that the logic is correct), you exercise the dynamic type checking for free.
- blep_ 4y agoAnd then it silently creates a user named True because the non-empty email address you passed as `create_if_not_exists` evaluated as truthy.