Главная
Study mode:
on
1
Intro
2
ŁUKASZ LANGA
3
WHAT WE'RE GOING TO TALK ABOUT
4
WHY ANNOTATE PYTHON CODE WITH TYPES?
5
TYPE CHECK ERROR VS. RUNTIME ERROR
6
THERE'S MORE TO TYPES THAN JUST CLASSES
7
WHAT IF A FUNCTION RETURNS ANYTHING?
8
WHAT IF A FUNCTION ONLY ACCEPTS LISTS WITH STRING ELEMENTS?
9
A STRING OR NONE?
10
WHAT IF A FUNCTION RETURNS A VALUE OF THE SAME TYPE AS PASSED AS AN ARGUMENT?
11
WHAT IF A FUNCTION ACCEPTS AN INT BUT IT'S REALLY EXPECTING ONLY FBIDS?
12
WHAT IF A FUNCTION ACCEPTS A CLASS, NOT AN OBJECT?
13
TYPE INFERENCE
14
GRADUAL TYPING
15
WORKFLOW SUGGESTION #2
16
FILE-LEVEL VS. FULL PROGRAM ANALYSIS
17
WORKFLOW SUGGESTION #3
18
WORKFLOW SUGGESTION #4
19
GOTCHAS
20
ONLY ANNOTATED FUNCTIONS ARE TYPED
21
UNIONS LIMIT ALLOWED BEHAVIOR
22
OUT OF ORDER DEFINITIONS IN PYTHON 3.7
23
IMPORT CYCLES IN PYTHON 3.7
24
MUTABLE COLLECTIONS ARE INVARIANT
25
CRAZY IDEAS
26
WHERE TO GET SUPPORT?
Description:
Explore gradual typing in production Python applications through this comprehensive conference talk from code::dive 2017. Delve into the benefits of annotating Python code with types, understand the differences between type check errors and runtime errors, and learn about advanced typing concepts beyond simple class annotations. Discover how to handle various function return scenarios, including returning anything, specific types, or values of the same type as the input. Examine techniques for specifying complex input requirements, such as lists with string elements or functions accepting classes instead of objects. Gain insights into type inference, gradual typing workflows, and file-level vs. full program analysis. Address common gotchas in typed Python, including limitations of unions and mutable collections. Conclude with a discussion on where to find support for implementing gradual typing in your projects.

Gradual Typing of Production Applications

code::dive conference
Add to list