mirror of
https://github.com/kristoferssolo/LU-bookstore.git
synced 2026-03-22 00:26:21 +00:00
feat(Book): add iter
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user