-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group 5 - Refactoring library class #18
base: main
Are you sure you want to change the base?
Conversation
return str(max) | ||
|
||
# Constructor | ||
def __init__(self, books: list[Book]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could have specified __init__
near class initialisation
max = b | ||
# end if | ||
# end if | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else
with pass
confuses for no reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve asap
def __init__(self, books: list[Book]): | ||
self._books = books | ||
|
||
_books: list[Book] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declare _books
when initialising
print("********* Longest Crime Audio Book **********") | ||
print("*********************************************") | ||
|
||
for b in self.get_books(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_audio_books=[b for b in self.get_books() if (b._book_type == "Audio") and (Genre.CRIME in b.genres)]
No description provided.