Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Python Type Hints
Search
Ayla Khan
May 16, 2018
Technology
44
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Python Type Hints
PyLadies lightning talk about Python type hints
Ayla Khan
May 16, 2018
More Decks by Ayla Khan
See All by Ayla Khan
Getting started with docker + python
aylakhan
0
24
Productive Bash
aylakhan
1
45
Unit Tests and Mocks: Testing in Python
aylakhan
0
33
Other Decks in Technology
See All in Technology
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
340
Local CI × GitHub Actions
gogutan
2
220
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
140
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.3k
DBについての基礎説明(MySQL編) - コロプラ 2026年度 新卒研修
colopl
0
100
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
130
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
290
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
260
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
170
Rust で関数型ドメインモデリング
takonda
0
140
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
120
その Valkey 使いこなしていますか?
onk
PRO
5
1.5k
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
WCS-LA-2024
lcolladotor
0
890
Building the Perfect Custom Keyboard
takai
2
910
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Everyday Curiosity
cassininazir
0
350
Are puppies a ranking factor?
jonoalderson
2
4.1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Site-Speed That Sticks
csswizardry
13
1.6k
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