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
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
250
What happened to RubyGems and what can we learn?
mikemcquaid
0
250
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
20260204_Midosuji_Tech
takuyay0ne
0
120
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
140
あたらしい上流工程の形。 0日導入からはじめるAI駆動PM
kumaiu
5
760
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
430
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
880
Digitization部 紹介資料
sansan33
PRO
1
6.8k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
610
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
360
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
630
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Balancing Empowerment & Direction
lara
5
880
Claude Code のすすめ
schroneko
67
210k
How to build a perfect <img>
jonoalderson
1
4.9k
Designing for Timeless Needs
cassininazir
0
130
GraphQLとの向き合い方2022年版
quramy
50
14k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
63
[SF Ruby Conf 2025] Rails X
palkan
1
740
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
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