Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Python Type Hinting!
You have completed Python Type Hinting!
Preview
What do you do when you're the only one on your team using type hints? Or when you have to work with Python versions before 3.5? This is where stub files save the day!
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
you don't wanna hint everything,
just a file or two at a time.
0:00
But you wanna make sure they don't look
weird to the other developers on your team
0:01
or other teams at your company, or
maybe you want to specify types for
0:05
someone else's library, but they're
resisting poor requests for type hints.
0:08
This is where a very handy feature
known as stub files comes in.
0:12
If you're familiar with C# typescript,
or Collin, this may look very similar.
0:16
So to start off we're gonna create
a new file in typing workshop.
0:20
That is called calculator.pyi.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up