Dataclasses python

Dataclasses python

Assessment

Flashcard

Computers

Professional Development

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

5 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Co robi dekorator @dataclass?

Back

Automatycznie generuje metody specjalne dla klasy

2.

FLASHCARD QUESTION

Front

Która metoda w klasach danych odpowiada za inicjalizację obiektu? __repr__, __eq__, __init__, __str__

Back

__init__

3.

FLASHCARD QUESTION

Front

Co zwróci poniższy kod?
Options: True, False, Błąd Kompilacji, None

Media Image

Back

True

4.

FLASHCARD QUESTION

Front

Jak zrobić, żeby klasa danych była niemutowalna (obiekty niezmienne)?

Back

@dataclass(frozen=True)

5.

FLASHCARD QUESTION

Front

Jaką metodę trzeba nadpisać, żeby klasa mogła mieć własne zasady porównywania obiektów?

Back

__eq__

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?