Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
最近のLinux普段づかいWaylandデスクトップ元年
penguin2716
1
690
文字列の並び順 / Unicode Collation
tmtms
3
550
コンテキスト情報を活用し個社最適化されたAI Agentを実現する4つのポイント
kworkdev
PRO
0
150
ガイドラインを軸にしたウェブアクセシビリティ改善
lycorptech_jp
PRO
1
100
Karate+Database RiderによるAPI自動テスト導入工数をCline+GitLab MCPを使って2割削減を目指す! / 20251206 Kazuki Takahashi
shift_evolve
PRO
1
700
コミューンのデータ分析AIエージェント「Community Sage」の紹介
fufufukakaka
0
480
RAG/Agent開発のアップデートまとめ
taka0709
0
160
regrowth_tokyo_2025_securityagent
hiashisan
0
220
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
240
【AWS re:Invent 2025速報】AIビルダー向けアップデートをまとめて解説!
minorun365
4
510
今からでも間に合う!速習Devin入門とその活用方法
ismk
1
660
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Fireside Chat
paigeccino
41
3.7k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Producing Creativity
orderedlist
PRO
348
40k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
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