Skip to content

[book-store] Simplify example.py #2175

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

Merged
merged 2 commits into from
Feb 20, 2020
Merged

[book-store] Simplify example.py #2175

merged 2 commits into from
Feb 20, 2020

Conversation

yawpitch
Copy link
Contributor

The existing example.py is quite complex and not particulary efficient,
even for quite small lists of books. This example.py is much simpler,
but could be made considerably more efficient through a bit of a caching
and some sensible short-circuit returns. These are left to the student
to figure out, however.

This one will also pass the new tests in #2174.

The existing example.py is quite complex and not particulary efficient,
even for quite small lists of books. This example.py is much simpler,
but could be made considerably more efficient through a bit of a caching
and some sensible short-circuit returns. These are left to the student
to figure out, however.
@yawpitch yawpitch requested a review from a team as a code owner February 13, 2020 16:39
Copy link
Contributor

@cmccandless cmccandless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much more readable than my solution, with the mentioned advantage of actually passing new tests.

@yawpitch yawpitch merged commit 14e4aed into exercism:master Feb 20, 2020
@yawpitch yawpitch deleted the simplify-book-store-example branch February 20, 2020 16:36
ErikSchierboom pushed a commit to ErikSchierboom/python that referenced this pull request Jan 21, 2021
…sm#2847)

* Add new concept exercise - string methods

* Fix formatting

* Use prettier to clean up markdown

* Resolve PR comments

* Fix closing bracket

* PR comment, add concept files

* Update languages/exercises/concept/string-methods/.meta/design.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/exercises/concept/string-methods/.docs/introduction.md

Co-authored-by: Olivia Kim <[email protected]>
Co-authored-by: BethanyG <[email protected]>
ErikSchierboom pushed a commit to ErikSchierboom/python that referenced this pull request Jan 22, 2021
…sm#2847)

* Add new concept exercise - string methods

* Fix formatting

* Use prettier to clean up markdown

* Resolve PR comments

* Fix closing bracket

* PR comment, add concept files

* Update languages/exercises/concept/string-methods/.meta/design.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/exercises/concept/string-methods/.docs/introduction.md

Co-authored-by: Olivia Kim <[email protected]>
Co-authored-by: BethanyG <[email protected]>
ErikSchierboom pushed a commit to ErikSchierboom/python that referenced this pull request Jan 26, 2021
…sm#2847)

* Add new concept exercise - string methods

* Fix formatting

* Use prettier to clean up markdown

* Resolve PR comments

* Fix closing bracket

* PR comment, add concept files

* Update languages/exercises/concept/string-methods/.meta/design.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/exercises/concept/string-methods/.docs/introduction.md

Co-authored-by: Olivia Kim <[email protected]>
Co-authored-by: BethanyG <[email protected]>
ErikSchierboom pushed a commit to ErikSchierboom/python that referenced this pull request Jan 27, 2021
…sm#2847)

* Add new concept exercise - string methods

* Fix formatting

* Use prettier to clean up markdown

* Resolve PR comments

* Fix closing bracket

* PR comment, add concept files

* Update languages/exercises/concept/string-methods/.meta/design.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/exercises/concept/string-methods/.docs/introduction.md

Co-authored-by: Olivia Kim <[email protected]>
Co-authored-by: BethanyG <[email protected]>
ErikSchierboom pushed a commit to ErikSchierboom/python that referenced this pull request Jan 29, 2021
* Add new concept exercise - string methods

* Fix formatting

* Use prettier to clean up markdown

* Resolve PR comments

* Fix closing bracket

* PR comment, add concept files

* Update languages/exercises/concept/string-methods/.meta/design.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/exercises/concept/string-methods/.docs/introduction.md

Co-authored-by: Olivia Kim <[email protected]>
Co-authored-by: BethanyG <[email protected]>
ErikSchierboom pushed a commit to ErikSchierboom/python that referenced this pull request Jan 29, 2021
* Add new concept exercise - string methods

* Fix formatting

* Use prettier to clean up markdown

* Resolve PR comments

* Fix closing bracket

* PR comment, add concept files

* Update languages/exercises/concept/string-methods/.meta/design.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/exercises/concept/string-methods/.docs/introduction.md

Co-authored-by: Olivia Kim <[email protected]>
Co-authored-by: BethanyG <[email protected]>
cmccandless pushed a commit that referenced this pull request Jan 29, 2021
* Add new concept exercise - string methods

* Fix formatting

* Use prettier to clean up markdown

* Resolve PR comments

* Fix closing bracket

* PR comment, add concept files

* Update languages/exercises/concept/string-methods/.meta/design.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/concepts/string-methods/about.md

* Update languages/exercises/concept/string-methods/.docs/introduction.md

Co-authored-by: Olivia Kim <[email protected]>
Co-authored-by: BethanyG <[email protected]>
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.

2 participants