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
45
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
Transcript
13 slides
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
More Decks by Ayla Khan
See All by Ayla Khan
Getting started with docker + python
aylakhan
0
25
Productive Bash
aylakhan
1
46
Unit Tests and Mocks: Testing in Python
aylakhan
0
33
Other Decks in Technology
See All in Technology
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
460
Context parameters で作る!はじめての型クラス
kworkdev
PRO
1
140
_マネジメントする人される人ナイト_2026__良いチームを作っていきたい_お気持ち_.pdf
xkxaxkx
0
750
Kansai WordPress Meetup@大阪『ブロックテーマを作る上で知っておくべきこと
torounit
0
210
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
10
4.8k
Claude Codeで新規事業を伸ばせるか? Zennの試行錯誤の記録
wadayusuke
2
230
Go初心者のクラウドエンジニアが、デプロイを通して旨味を知っていく話
ryudai
1
230
文書画像からの情報抽出を行うエージェントを、軌跡の正解データ無しで作れるか
sansantech
PRO
2
170
20261113_JAWS_Osaka
takuyay0ne
0
570
AWS基盤改善を支える 私たちの理念と行動指針
kentosuzuki
0
240
2026-11-11 Tamachi.sre#7 PaCにインフラリソースの命を救われました。 / PaC saves the infra resource life
masasuzu
1
200
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
160
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
130k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
530
First, design no harm
axbom
PRO
2
1.4k
Producing Creativity
orderedlist
PRO
348
41k
Designing for humans not robots
tammielis
254
26k
Done Done
chrislema
187
17k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
A Modern Web Designer's Workflow
chriscoyier
699
190k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Believing is Seeing
oripsolob
1
280