Determine behaviour of Static Typing in Python

Dishant Sethi (~dishant24)


2

Votes

Description:

Those who come from the background of statically typed programming languages like typescript, golang etc, understands the importance of static typing. Luckily Python can be considered as both static and dynamic programming language. We can achieve static typing in python using 'typing' module. Python's Typing module has transformed the way developers approach static type checking and code quality in the language.

In this talk we are going to see the WHAT and the HOW of 'typing'. In simple words, WHAT specifies the behaviour of static typing and HOW specifies the implementation of static typing. We will discuss the fundamentals of:

  • static typing
  • type hints
  • annotations
  • generics
  • protocols
  • and showcase real-world examples of how the Typing module can transform your Python projects.

The talk timeline is as follows:

  • Introduction (2 minutes)
  • A question: Is python statically typed or dynamically typed? (1 minute)
  • dropbox build mypy, google build pytype, facebook build pyre, microsoft build pyright, BUT WHY? (2 minutes)
  • Brief overview of the importance of Static Typing (3 minutes)
  • Basics understanding of types in python (2 minutes).
  • Type hints to improve your projects (3 minutes)
  • Type annotations (3 minutes)
  • Generics and protocols (4minutes)
  • How dropbox type checked 4 million lines of python code (https://dropbox.tech/application/our-journey-to-type-checking-4-million-lines-of-python) (5 minutes)
  • QnA (5 minutes)

Attendee Takeaways: 1. After this talk, it is our hope that you will implement static typing in your projects and no longer get a lot of runtime errors as they will be detected earlier in the development phase. 2. The examples present in the talk will cover typing.Protocols, dataclass and a bunch of other commonly used functions of Python's typing module.

Note: The talk will be suitable for both beginner and intermediate level participants.

Prerequisites:

Basic understanding of newer versions of python

Content URLs:

Slides: https://docs.google.com/presentation/d/1Qthk6Im-mFfWL_DdetobcWTVYtJxMxMI1bgOk27hlks/edit?usp=sharing

Speaker Info:

Dishant Sethi, a software consultant with more than 3 years of professional experience. He's equipped with the experience in web development, Cloud Engineering and DevOps. He's self-motivated and able to work independently with minimal supervision. He is a regular speaker at local community meetups in Delhi and an international speaker at PyconDE & Pydata Berlin.

Talk to him about:

  • Web Development Practices
  • Cloud Engineering
  • Free and Open Source Software (FOSS) Community
  • Starting Software Engineering Journey

Speaker Links:

Linkedin Twitter Github

Section: Core Python
Type: Talks
Target Audience: Intermediate
Last Updated: