mirror of
https://github.com/kristoferssolo/LU-bookstore.git
synced 2025-10-21 18:00:34 +00:00
feat(Book): add iter
This commit is contained in:
parent
2dd9fac786
commit
3ef55892da
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user