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.7k
便利に使おう変数アノテーション -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
電子辞書にステータスバーを実装する
puhitaku
0
170
知育おもちゃの遊び方 Lv. 999
puhitaku
5
2.7k
ルーターでプレゼンする
puhitaku
1
4.7k
AST as Black Magic
puhitaku
0
110
次世代の足下を舗装するコミュニティ
puhitaku
5
1.7k
電子辞書で学ぶ Linux のサスペンド
puhitaku
0
580
USB PD で迎える AC アダプター大統一時代
puhitaku
2
2.5k
電子辞書のアイデンティティを消す方法
puhitaku
3
3.9k
リセットとフリーズで解析する電子辞書リバエン記 / reverse-engineer-e-dictionaries-with-reset-and-freeze
puhitaku
2
6.4k
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
KATA
mclloyd
29
13k
Code Reviewing Like a Champion
maltzj
519
39k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
The Language of Interfaces
destraynor
154
24k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
What's new in Ruby 2.0
geeforr
342
31k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Transcript
كٝٔח⢪ֲֶ㢌侧،ظذ٦ءّٝ UZQJOHQZהך嚂׃ְֶ➰ֹさְ .BOJQVMBUJOH7BSJBCMF"OOPUBUJPOTPO3VOUJNF 'PSBZFUBOPUIFSVTBHFPGUZQFIJOUT 5BLVNJ4VFEB 'VMMFS *OD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