17
Marc-Anthony Taylor
http://marcanthonytaylor.com/
Last seen 2 years ago
Member for 9 years, 11 months, 11 days
Difficulty Normal
Python dev working in infosec =)
Love that you included the one liner! It is something I have never really gotten the hang of.
More
While it is clear, your solution isn't very "pythonic". Which isn't bad
necessarily! If you look at some idioms you might find ways to make your
code more readable.
More
Only thing I'd add just now is watch out for the name shadowing.
More
Other than a couple of place you could shorten your code, and maybe a
little formatting, it looks good!
More
The code looks fine for the most part, a little more attention to formatting and `PEP8`.
But why is this under 3rd party?
More
You might want to look at how inheritance works. For example:
`Warrior.__init__(self)` would be better as `super().__init__()`
Also, maybe consider adding args or keyword args to the constructor.
More
While this code does work, you might want to look at `pep8` as it isn't
terribly clear.
More
Better solution: https://py.checkio.org/mission/completely-empty/publications/gileadslostson/python-3/pulling-teeth-part-3/
More
Short and sweet =) If you want to follow PEP8 though, watch for those spaces before and after "=".
More
You might want to look at your spacing (e.g. `start+=1` should be `start += 1`)
More
Simple and clear. For the `__repr__` you might want to use `f-strings` which are awesome =)
More
Have a look at `PEP8` maybe to check your formatting. For example your `__init__` should be at the top. This shows a logical progression to the code.
More
Better solution: https://py.checkio.org/mission/completely-empty/publications/gileadslostson/python-3/pulling-teeth-part-3/
More
Your code is quite verbose. You could have a look at how to shorten it and make it more `pythonic`
More