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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.2k
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.3k
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
370
プロポーザルに込める段取り八分
shoheimitani
1
190
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
130
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
340
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.2k
[CV勉強会@関東 World Model 読み会] Orbis: Overcoming Challenges of Long-Horizon Prediction in Driving World Models (Mousakhan+, NeurIPS 2025)
abemii
0
110
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
210
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
18k
We Are The Robots
honzajavorek
0
160
Leo the Paperboy
mayatellez
4
1.4k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Mobile First: as difficult as doing things right
swwweet
225
10k
Designing for Timeless Needs
cassininazir
0
130
Scaling GitHub
holman
464
140k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
92
How to build a perfect <img>
jonoalderson
1
4.9k
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