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
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
配列に見る bash と zsh の違い
kazzpapa3
1
120
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
170
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
170
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
220
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
180
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
440
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
150
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
20260204_Midosuji_Tech
takuyay0ne
1
140
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
200
AWS Network Firewall Proxyを触ってみた
nagisa53
0
180
Stately
mu7889yoon
1
110
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Into the Great Unknown - MozCon
thekraken
40
2.2k
The Curse of the Amulet
leimatthew05
1
8.3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
820
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
RailsConf 2023
tenderlove
30
1.3k
Odyssey Design
rkendrick25
PRO
1
490
How GitHub (no longer) Works
holman
316
140k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
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