-
Throughout the book the
Which returns the longest Question: would it make sense to achieve the same using a more pythonic approach?
I could provide a PR if requested. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Good call. I may have done it the verbose way to make it more readable, but I generally like the more pythonic approach you highlighted. That's imho how it should be done. Unfortunately, I prefer not to change the code because it would otherwise introduce a difference to the book, which could confuse readers. However, I think it's a good idea to add your suggestion via a code comment. Please feel free to open a PR if you have time (otherwise, no worries, I am also happy to do it, just let me know). Thanks for the suggestion in any case! |
Beta Was this translation helpful? Give feedback.
Good call. I may have done it the verbose way to make it more readable, but I generally like the more pythonic approach you highlighted. That's imho how it should be done. Unfortunately, I prefer not to change the code because it would otherwise introduce a difference to the book, which could confuse readers. However, I think it's a good idea to add your suggestion via a code comment. Please feel free to open a PR if you have time (otherwise, no worries, I am also happy to do it, just let me know). Thanks for the suggestion in any case!