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
36
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
18
Productive Bash
aylakhan
1
37
Unit Tests and Mocks: Testing in Python
aylakhan
0
22
Other Decks in Technology
See All in Technology
家族の思い出を形にする 〜 1秒動画の生成を支えるインフラアーキテクチャ
ojima_h
1
580
隙間時間で爆速開発! Claude Code × Vibe Coding で作るマニュアル自動生成サービス
akitomonam
3
250
製造業の課題解決に向けた機械学習の活用と、製造業特化LLM開発への挑戦
knt44kw
0
160
ビジネス文書に特化した基盤モデル開発 / SaaSxML_Session_2
sansan_randd
0
270
Mambaで物体検出 完全に理解した
shirarei24
2
220
リリース2ヶ月で収益化した話
kent_code3
1
220
Rubyの国のPerlMonger
anatofuz
3
730
帳票構造化タスクにおけるLLMファインチューニングの性能評価
yosukeyoshida
1
240
猫でもわかるQ_CLI(CDK開発編)+ちょっとだけKiro
kentapapa
0
3.4k
【Λ(らむだ)】最近のアプデ情報 / RPALT20250729
lambda
0
230
僕たちが「開発しやすさ」を求め 模索し続けたアーキテクチャ #アーキテクチャ勉強会_findy
bengo4com
0
2.1k
Intro to Software Startups: Spring 2025
arnabdotorg
0
190
Featured
See All Featured
Fireside Chat
paigeccino
38
3.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
How STYLIGHT went responsive
nonsquared
100
5.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
BBQ
matthewcrist
89
9.8k
Building an army of robots
kneath
306
45k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Site-Speed That Sticks
csswizardry
10
760
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