Skip to content

Consistent usage in 4-application-development.md #39

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adnanvaldes
Copy link

In the Epilogue of Part 10, Section 4, the dependency injection example uses storage_service to illustrate the ability to maintain a user interface even when storage locations change.

However, in the example it shows:

class PhoneBookApplication:
    def __init__(self, filename):
        self.__phonebook = PhoneBook()
        self.__filename = filename

    # the rest of the user interface

# use a different filename
storage_service = FileHandler("new_phonebook.txt")

The PhoneBookApplication class constructor should continue to use storage_service with the filename change only being applied in the name passed to FileHandler.

In the Epilogue of Part 10, Section 4, the dependency injection example uses `storage_service`  to illustrate the ability to maintain a user interface even when storage locations change.

However, in the example it shows:

```
class PhoneBookApplication:
    def __init__(self, filename):
        self.__phonebook = PhoneBook()
        self.__filename = filename

    # the rest of the user interface

# use a different filename
storage_service = FileHandler("new_phonebook.txt")
```

The `PhoneBookApplication` class constructor should continue to use `storage_service` with the filename change only being applied in the name passed to `FileHandler`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant