this post was submitted on 24 Feb 2025
387 points (99.2% liked)
Programmer Humor
21658 readers
722 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Python now has type hints, which are not the same as static typing. Those hints do not change program operation. See https://peps.python.org/pep-3107/
You can pass a string to a function parameter annotated as int and Python will happily accept it (assuming the function does not attempt to call a method that a string doesn't have).
CAN being the critical word here. If you use tools like pydantic, then yes, typing can be strictly enforced, or as most people use it, you can type only what you want to type.
You got any code written for Python 3.8 that won't run in 3.13?