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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Decorator

A

A function that takes another function and extends or modifies its behaviour with permanently changing it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Generator

A

Function that returns an iterator, yielding one value at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Memory management

A

Reference counting and cyclic garbage collection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Multithreading use case

A

I/O bound tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Multiprocessing use case

A

CPU bound tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Vectorisation

A

Operations working on entire data structures at once rather than using loops

How well did you know this?
1
Not at all
2
3
4
5
Perfectly