Static and dynamic typing
Whether a program's types are checked before it runs, by a compiler or a type checker, or only as each line runs, as Python does.
Depth 1 · Foundation
You know that Python checks types only when each line runs, so a mistake in a branch that never ran can wait for months, while a static checker such as mypy reads every line before anything runs; and you use `isinstance` to check data that arrives from outside.
Sign in to prove what you know with a short quiz, see how deep you've gone, and earn XP for it.
Sign in with GoogleDepths of understanding
- 1
Foundation
You know that Python checks types only when each line runs, so a mistake in a branch that never ran can wait for months, while a static checker such as mypy reads every line before anything runs; and you use `isinstance` to check data that arrives from outside.
Your path here
What's still between you and Static and dynamic typing, depth 1, in the order you can learn it.
- 1ProgramDepth 1 · Foundation · Program Basics
- 2ExpressionDepth 1 · Foundation · Program Basics
- 3Variables in codeDepth 1 · Foundation · Program Basics
- 4Program stateDepth 1 · Foundation · Program Basics
- 5Input and outputDepth 1 · Foundation · Program Basics
- 6Functions in codeDepth 1 · Foundation · Functions
- 7Return valuesDepth 1 · Foundation · Functions
- 8BooleansDepth 1 · Foundation · Control Flow
- 9ConditionalsDepth 1 · Foundation · Control Flow
- 10LoopsDepth 1 · Foundation · Control Flow
- 11Accumulator patternDepth 1 · Foundation · Control Flow
- 12Floating-point numbersDepth 1 · Foundation · Data Types
- 13Basic typesDepth 1 · Foundation · Data Types
- 14Character encodingDepth 1 · Foundation · Data Types
- 15StringsDepth 1 · Foundation · Data Types
- 16Type conversionDepth 1 · Foundation · Data Types
- 17ExceptionsDepth 1 · Foundation · Writing Correct Code
- 18NoneDepth 1 · Foundation · Data Types
- 19ListsDepth 1 · Foundation · Data Structures
- 20DictionariesDepth 1 · Foundation · Data Structures
- 21Type annotationsDepth 1 · Foundation · Writing Correct Code
- 22Static and dynamic typingDepth 1 · Foundation · Writing Correct Code
Where it fits
Builds on
This concept