0% found this document useful (0 votes)
12 views

Python Annotation

This document provides links to resources about Python type annotations including guides on Python type checking and annotation best practices as well as instructions for installing mypy to check for annotation errors and a link to exercises to add annotations to sorting algorithms code.

Uploaded by

Vuong Phan Thi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Python Annotation

This document provides links to resources about Python type annotations including guides on Python type checking and annotation best practices as well as instructions for installing mypy to check for annotation errors and a link to exercises to add annotations to sorting algorithms code.

Uploaded by

Vuong Phan Thi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PYTHON ANNOTATION

1) Python Type Checking (Guide)


https://realpython.com/python-type-checking/#playing-with-python-types-part-1

2) Annotations Best Practices


https://docs.python.org/3/howto/annotations.html

3) Check annotation error:


pip install mypy
mypy <file-name.py>

4) Exercises: Add python annotation for the python code (only python code)
https://github.com/B3ns44d/Python_Sorting_Algorithms/tree/master

Notes: You complete the exercises when mypy returns no errors.

You might also like