Slide 1

Slide 1 text

PyCon Korea 2019 ੿੸ ఋੑ Ѩࢎ۽ ؊ ա਷ Python ௏٘ ੘ࢿೞӝ ੉ହ൞

Slide 2

Slide 2 text

ߊ಴੗ blurfx • ࣽୌೱ؀೟Ү (2014 ~ ) • ֏ट௏ܻই (2018.03 ~ 2019.07) • ೖ೒ಎ٘ஹಌפ (2019.07 ~ )

Slide 3

Slide 3 text

౵੉ॆਸ फযೞח ࢎۈٜ਷ ౵੉ॆਸ ৵ फযೡөਃ?

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

੿੸ ఋੑ ঱য
 ز੸ ఋੑ ঱য

Slide 6

Slide 6 text

੿੸ ఋੑ ঱য Writing Code Build Test Run/Deploy য়ܨܳ ߊѼೞח ҳр

Slide 7

Slide 7 text

ز੸ ఋੑ ঱য Writing Code Test Run/Deploy য়ܨܳ ߊѼೞח ҳр

Slide 8

Slide 8 text

੿੸ ఋੑ Ѩࢎо ޖ঺੉Ҋ ೞݶ ޖ঺੉ જই૑աਃ?

Slide 9

Slide 9 text

೐۽ં౟о ੘ਵݶ ѐߊ੗੄ ࣻب ੸Ҋ, ߡӒ੄ ࣻب ੸૑݅ icons from https://icons8.com

Slide 10

Slide 10 text

೐۽ં౟о ੘ਵݶ ѐߊ੗੄ ࣻب ੸Ҋ, ߡӒ੄ ࣻب ੸૑݅ icons from https://icons8.com ೐۽ં౟о ழ૑Ҋ ѐߊ੗о ݆ই૑ݶ Ӓ ݅ఀ ߡӒب ݆ই૘פ׮

Slide 11

Slide 11 text

೐۽ં౟о ੘ਵݶ ѐߊ੗੄ ࣻب ੸Ҋ, ߡӒ੄ ࣻب ੸૑݅ icons from https://icons8.com ೐۽ં౟о ழ૑Ҋ ѐߊ੗о ݆ই૑ݶ Ӓ ݅ఀ ߡӒب ݆ই૘פ׮ ز੸ ఋੑ ঱য۽ ੘ࢿೠ ௏٘ח ೐۽ં౟о ழ૕ࣻ۾
 п ё୓о যڃ чਸ ঌҊ ੓ח૑ ൨ٜয૘פ׮ var x 
 
 ... x ?

Slide 12

Slide 12 text

Writing Code Static Type Checking Test Run/Deploy ੿੸ ఋੑ ୓௼۽ ఋੑী য়ܨо ੓ח૑ Ѩࢎ

Slide 13

Slide 13 text

௏٘੄ оةࢿ੉ ৢۄоҊ ఋੑਵ۽ ߊࢤೡ ࣻ ੓ח ߡӒܳ ৘ߑ೧઻ਃ

Slide 14

Slide 14 text

௏٘੄ оةࢿ੉ ৢۄоҊ ఋੑਵ۽ ߊࢤೡ ࣻ ੓ח ߡӒܳ ৘ߑ೧઻ਃ

Slide 15

Slide 15 text

To Type or Not to Type: Quantifying Detectable Bugs in JavaScript http://earlbarr.com/publications/typestudy.pdf

Slide 16

Slide 16 text

http://earlbarr.com/publications/typestudy.pdf To Type or Not to Type

Slide 17

Slide 17 text

Conclusion: we found that using Flow or TypeScript could have prevented 15% of the public bugs for public projects on GitHub. http://earlbarr.com/publications/typestudy.pdf To Type or Not to Type

Slide 18

Slide 18 text

Conclusion: we found that using Flow or TypeScript could have prevented 15% of the public bugs for public projects on GitHub. http://earlbarr.com/publications/typestudy.pdf To Type or Not to Type

Slide 19

Slide 19 text

౵੉ॆ਷ ز੸ ఋੑ ঱যੋؘ ఋੑਸ যڌѱ ઻ਃ?

Slide 20

Slide 20 text

Function Annotation Type Annotation Variable Annotation Python 3.0+ Python 3.5+ Python 3.6+

Slide 21

Slide 21 text

Python 3.6+

Slide 22

Slide 22 text

ఋੑ ൦౴

Slide 23

Slide 23 text

ఋੑ ൦౴

Slide 24

Slide 24 text

ఋੑ ൦౴

Slide 25

Slide 25 text

ఋੑ ൦౴

Slide 26

Slide 26 text

ఋੑ ൦౴

Slide 27

Slide 27 text

• ੿ࣻ৬ ޙ੗ৌ݅ ೲਊೞח ܻझ౟ • ޙ੗ৌ, पࣻ, ࠗ਎ ࣽࢲ۽ ػ ౚ೒ • ޙ੗ৌ ః৬ ߄੉౟ чਸ о૓ ٤࣊ցܻ • ઁ֎ܼ ೣࣻ৬ ௿ېझ ఋੑ ൦౴

Slide 28

Slide 28 text

https://imgflip.com/i/186jmm

Slide 29

Slide 29 text

ఋੑ ൦౴

Slide 30

Slide 30 text

ఋੑ ൦౴

Slide 31

Slide 31 text

ఋੑ ൦౴

Slide 32

Slide 32 text

TypeError: Too many parameters for typing.List; actual 2, expected 1 ఋੑ ൦౴

Slide 33

Slide 33 text

ఋੑ ൦౴

Slide 34

Slide 34 text

ఋੑ ൦౴

Slide 35

Slide 35 text

ఋੑ ൦౴

Slide 36

Slide 36 text

ఋੑ ൦౴

Slide 37

Slide 37 text

ఋੑ ൦౴

Slide 38

Slide 38 text

ఋੑ ൦౴

Slide 39

Slide 39 text

ఋੑ ൦౴

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

ఋੑ ൦౴

Slide 42

Slide 42 text

ఋੑ ൦౴

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

http://blog.daum.net/junjungirl/109

Slide 46

Slide 46 text

“ no type checking happens at runtime ” — PEP 484

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

mypy mypy ࢸ஖ೞӝ

Slide 49

Slide 49 text

mypy ੿੸ ఋੑ Ѩࢎೞӝ

Slide 50

Slide 50 text

mypy ੿੸ ఋੑ Ѩࢎೞӝ

Slide 51

Slide 51 text

mypy ੿੸ ఋੑ Ѩࢎೞӝ

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

Incompatible types in assignment (expression has type "str", variable has type "int") List item 1 has incompatible type "int"; expected "str" List item 2 has incompatible type "float"; expected "str" Argument 1 to "append" of "list" has incompatible type "bytes"; expected "str"

Slide 54

Slide 54 text

mypy

Slide 55

Slide 55 text

mypy

Slide 56

Slide 56 text

mypy

Slide 57

Slide 57 text

mypy.readthedocs.io ؊ ੗ࣁೠ ղਊ਷...

Slide 58

Slide 58 text

github.com/python/mypy

Slide 59

Slide 59 text

Q & A

Slide 60

Slide 60 text

хࢎ೤פ׮ [email protected]