feat(Book): add iter

This commit is contained in:
Kristofers Solo 2023-11-08 12:32:22 +02:00
parent 2dd9fac786
commit 3ef55892da

View File

@ -31,3 +31,6 @@ class Book:
def values(self) -> tuple[ISBN, str, str, float, int]:
return self.isbn, self.title, self.author, self.price, self.stock
def __iter__(self):
yield from self.values()