-
Notifications
You must be signed in to change notification settings - Fork 14
Try maked OOP version #24
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
base: main
Are you sure you want to change the base?
Conversation
| SHOPPING_RESULT = [] | ||
| COAST_LIST= [] | ||
| DICT = {} | ||
| class With_File_Working(): |
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.
Именование классов пишется без _, то есть вместо With_File_Working нужно написать WithFileWorking
| self._path = path | ||
| self.name = name | ||
|
|
||
| def read_file(adress, name) -> List: |
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.
нужно передать параметр self, и через него получать _path, а не передавать его в функцию явно
| return data.get(name) | ||
|
|
||
| def user_menu() -> str: | ||
| def write_file(adress, data) -> None: |
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.
тоже, прокинуть self и из него получать _path
No description provided.