Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Python Type Hints
Search
Ayla Khan
May 16, 2018
Technology
0
38
Python Type Hints
PyLadies lightning talk about Python type hints
Ayla Khan
May 16, 2018
Tweet
Share
More Decks by Ayla Khan
See All by Ayla Khan
Getting started with docker + python
aylakhan
0
20
Productive Bash
aylakhan
1
39
Unit Tests and Mocks: Testing in Python
aylakhan
0
28
Other Decks in Technology
See All in Technology
Lambdaの常識はどう変わる?!re:Invent 2025 before after
iwatatomoya
1
450
AWS Security Agentの紹介/introducing-aws-security-agent
tomoki10
0
140
Challenging Hardware Contests with Zephyr and Lessons Learned
iotengineer22
0
180
手動から自動へ、そしてその先へ
moritamasami
0
300
Gemini でコードレビュー知見を見える化
zozotech
PRO
1
250
ログ管理の新たな可能性?CloudWatchの新機能をご紹介
ikumi_ono
1
650
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
240
re:Inventで気になったサービスを10分でいけるところまでお話しします
yama3133
1
120
AI駆動開発における設計思想 認知負荷を下げるフロントエンドアーキテクチャ/ 20251211 Teppei Hanai
shift_evolve
PRO
2
350
エンジニアリングマネージャー はじめての目標設定と評価
halkt
0
280
AI 駆動開発勉強会 フロントエンド支部 #1 w/あずもば
1ftseabass
PRO
0
330
AWSセキュリティアップデートとAWSを育てる話
cmusudakeisuke
0
240
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
GraphQLとの向き合い方2022年版
quramy
50
14k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
A better future with KSS
kneath
240
18k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
98
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
The Invisible Side of Design
smashingmag
302
51k
Transcript
Python (3.5+) Type Hints Using Type Aliases
What Are Python Type Hints? • New in 3.5 (provisional)
• PEP484 • Optional (not enforced at runtime) ◦ Linter use recommended instead • Function annotations • Type Aliases, NewType, Callable, Generics ...
Type Alias
Type Alias Linting
Type Alias At Runtime
Type Alias
Type Alias At Runtime
Type Alias
Type Alias
Type Alias (Any type, implicit)
Type Alias (Any type, implicit)
Type Hints Advantages • Clarifies, “enforces” intent • Improves readability
◦ Simplifies type signatures • Improves testability • May prevent bugs
Type Hints Disadvantages • Lose dynamic typing flexibility • Syntax
complexity