The REAL Reason You Should Use Type Hints in Python

ArjanCodes • May 2, 2025
Video Thumbnail
ArjanCodes Logo

ArjanCodes

View Channel

About

On this channel, I post videos about programming and software design to help you take your coding skills to the next level. I'm an entrepreneur and a university lecturer in computer science, with more than 20 years of experience in software development and design. If you're a software developer and you want to improve your development skills, and learn more about programming in general, make sure to subscribe for helpful videos. I post a video here every Friday. If you have any suggestion for a topic you'd like me to cover, just leave a comment on any of my videos and I'll take it under consideration. Thanks for watching!

Video Description

👷 Review code better and faster with my 3-Factor Framework: https://arjan.codes/diagnosis. In this video, I’m going to show you why type hints in Python are useful, how to add them to your Python code, as well as some interesting properties of type hints that really surprised me. 🔥 GitHub Repository: https://git.arjan.codes/2025/typehints. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. 🔖 Chapters: 0:00 Intro 0:23 Background 1:17 Adding Type Hints to a Function 3:11 A Better Data Structure? 5:26 Best Practice: Be Generic for Input 5:49 Another example of generic inputs 8:13 Best practice: use Specific Outputs 10:07 Another example 11:51 Final thoughts #arjancodes #softwaredesign #python

You May Also Like