Created
October 24, 2023 17:08
-
-
Save VMois/389dd55b60d5094391bb6c643f3e9bc4 to your computer and use it in GitHub Desktop.
Python types are not strict (code snippet for GDSC BME event)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def do_things(a: int, b: int) -> int: | |
return a + b | |
print(do_things(2, 3)) | |
print(do_things("hello", " world!")) | |
# print(do_things(2, " world!")) # this will throw an exception |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment