Completed
New Feature on Type Hints in 3.11 Python 3.11 is focused on performance tuning but there are also new features in Typing
Class Central Classrooms beta
YouTube videos curated by Class Central.
Classroom Contents
Peacock - Getting Started with Statically Typed Programming in Python 3.10
Automatically move to the next video in the Classroom when playback concludes
- 1 Getting Started with Statically Typed Programming in Python 3.10
- 2 Let's start with function definitions Nothing too difficult Just write type . After the arguments, write colon and the type . Before the colon at the end of the function definition write an arrow and…
- 3 Escaping from complex type puzzles • Any can hold instances of any type • It's better not to use it • Import and use from typing when necessary
- 4 Using types from collections.abc differently • There are many types in collections.abe" . It's better to use a collection with a few methods to increase portability • Ex. 'Iterable is better than "li…
- 5 The differences between tuple and other Sequences • tuple' is fixed up to the length of information • Specify the type for the number of elements . Or you can mix types, such as tuple int
- 6 A sequence, such as a list has the same constraint for all elements . Can be used regardless of the length of the Sequence by setting only one
- 7 User-defined Generic types Example: a generic mapping type
- 8 What is the future. module? . Using typing new feature in the older versions, write
- 9 New Features on Type Hints in 3.10 • PEP 504: New Type Union Operator • PEP 512 Parameter Specification Variables
- 10 PEP 612: Parameter Specification Variables Motivation Needed a way to represent a function that has the same arguments as the specified function
- 11 PEP 647: User-Defined Type Guards Motivation • Type checker tools use a technique called type narrowing to determine the type of information
- 12 New Feature on Type Hints in 3.11 Python 3.11 is focused on performance tuning but there are also new features in Typing
- 13 Summary 1. Benefits, starting with def , Built-in types 2. Standard collections since 39 3. Collections, Union, Optional Callable. User-defined Generics