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
便利に使おう変数アノテーション -typing.py との楽しいお付き合い-
Search
Takumi Sueda
September 08, 2017
4
8.8k
便利に使おう変数アノテーション -typing.py との楽しいお付き合い-
PyCon JP 2017 Conference Day 1
Takumi Sueda
September 08, 2017
Tweet
Share
More Decks by Takumi Sueda
See All by Takumi Sueda
組み込みLinuxの時系列
puhitaku
4
1.3k
電子辞書にステータスバーを実装する
puhitaku
0
210
知育おもちゃの遊び方 Lv. 999
puhitaku
5
2.8k
ルーターでプレゼンする
puhitaku
1
5k
AST as Black Magic
puhitaku
0
120
次世代の足下を舗装するコミュニティ
puhitaku
5
1.7k
電子辞書で学ぶ Linux のサスペンド
puhitaku
0
620
USB PD で迎える AC アダプター大統一時代
puhitaku
2
2.6k
電子辞書のアイデンティティを消す方法
puhitaku
3
3.9k
Featured
See All Featured
Being A Developer After 40
akosma
87
590k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Speed Design
sergeychernyshev
25
670
What's in a price? How to price your products and services
michaelherold
243
12k
Visualization
eitanlees
146
15k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
100
Building Adaptive Systems
keathley
38
2.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Transcript
كٝٔח⢪ֲֶ㢌侧،ظذ٦ءّٝ UZQJOHQZהך嚂׃ְֶ➰ֹさְ .BOJQVMBUJOH7BSJBCMF"OOPUBUJPOTPO3VOUJNF 'PSBZFUBOPUIFSVTBHFPGUZQFIJOUT 5BLVNJ4VFEB 'VMMFS *OD%FWFMPQFS
)J 5BLVNJ4VFEB QVIJUBLV 'VMMFS *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