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
Github Copilot エージェントモードで試してみた
ochtum
0
140
FrankenPHPでLaravelを動かしてみよう
yousaku
0
100
GitHub Copilot の概要
tomokusaba
1
150
Fabric + Databricks 2025.6 の最新情報ピックアップ
ryomaru0825
1
160
モバイル界のMCPを考える
naoto33
0
390
無意味な開発生産性の議論から抜け出すための予兆検知とお金とAI
i35_267
2
7.1k
Backlog ユーザー棚卸しRTA、多分これが一番早いと思います
__allllllllez__
1
110
KiCadでPad on Viaの基板作ってみた
iotengineer22
0
250
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
240
Node-REDのFunctionノードでMCPサーバーの実装を試してみた / Node-RED × MCP 勉強会 vol.1
you
PRO
0
130
OPENLOGI Company Profile
hr01
0
67k
製造業からパッケージ製品まで、あらゆる領域をカバー!生成AIを利用したテストシナリオ生成 / 20250627 Suguru Ishii
shift_evolve
PRO
1
160
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
184
22k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
A Modern Web Designer's Workflow
chriscoyier
694
190k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Bash Introduction
62gerente
614
210k
Practical Orchestrator
shlominoach
188
11k
Typedesign – Prime Four
hannesfritz
42
2.7k
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