Lesson 10 - Week 10: The Standard Library Flashcards

(14 cards)

1
Q

dataclass

A

A module that allows to create value semantic types with fewer keystrokes by providing a decorator that can be used in a class, which will generate all the required boilerplate to have a class with the most common methods.

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

pathlib

A

A module that provides a way to represent and interact with filesystem paths.

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

exists

A

An operation that checks whether the path exists in the filesystem and whether it is a file or a directory

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

is_dir

A

An operation that checks whether the path is a directory.

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

is_file

A

An operation that checks whether the path is a file.

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

iterdir

A

An operation that returns an iterator with path objects to all the files and directories contained within the path object.

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

mkdir

A

An operation that creates a directory in the path indicated by the path object.

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

glob

A

A key function of Path objects that allows to specify a set of filenames by using wildcards.

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

read_text

A

An operation that returns the content of the file as a Unicode string.

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

subprocess

A

A module that allows to start a new process and communicate with it, bringing to Python all the available tools installed on your OS through an easy-to-use API.

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

counter

A

A class that allows to count hashable objects.

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

ChainMap

A

A structure that allows to combine lookups for multiple mapping objects, usually dictionaries.

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

partial

A

A function that allows to adapt existing functions by providing values for some of their arguments.

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

turtle

A

A module that allows a user to interact with the cursor and leave a trail as it keeps moving.

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