Python Flashcards
1
Q
GIL
A
Global Interpreter Lock is a mechanism in CPython that allows only one thread to execute Python bytecode at a time
2
Q
Decorator
A
A function that takes another function and extends or modifies its behaviour with permanently changing it
3
Q
Generator
A
Function that returns an iterator, yielding one value at a time
4
Q
Memory management
A
Reference counting and cyclic garbage collection
5
Q
Multithreading use case
A
I/O bound tasks
6
Q
Multiprocessing use case
A
CPU bound tasks
7
Q
Vectorisation
A
Operations working on entire data structures at once rather than using loops