Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Python Type Hints
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ayla Khan
May 16, 2018
Technology
0
40
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
40
Unit Tests and Mocks: Testing in Python
aylakhan
0
28
Other Decks in Technology
See All in Technology
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
配列に見る bash と zsh の違い
kazzpapa3
1
110
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
170
月間数億レコードのアクセスログ基盤を無停止・低コストでAWS移行せよ!アプリケーションエンジニアのSREチャレンジ💪
miyamu
0
820
IaaS/SaaS管理における SREの実践 - SRE Kaigi 2026
bbqallstars
4
1.7k
What happened to RubyGems and what can we learn?
mikemcquaid
0
250
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
180
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
210
クレジットカード決済基盤を支えるSRE - 厳格な監査とSRE運用の両立 (SRE Kaigi 2026)
capytan
6
2.6k
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
Stately
mu7889yoon
1
110
Tebiki Engineering Team Deck
tebiki
0
24k
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Testing 201, or: Great Expectations
jmmastey
46
8k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
55
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
Documentation Writing (for coders)
carmenintech
77
5.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.8k
My Coaching Mixtape
mlcsv
0
46
BBQ
matthewcrist
89
10k
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