Homepage
Sign in / Sign up
Go to the profile of Erin Greenhalgh
Erin Greenhalgh
Jul 10, 2016
Pushing Logic Down the Stack: An Exercise in Refactoring
Erin Greenhalgh
12

Hi Ashish, thanks for your comment! You are absolutely right about the decrease_quantity method (that’s what happens when you try to code on public transit.) I updated the method to be correct. I also realized that I needed to call self.quantity since I am updating the value of the attribute.

  • Go to the profile of Erin Greenhalgh

    Erin Greenhalgh

    • Share
    Go to the profile of Erin Greenhalgh
    Never miss a story from Erin Greenhalgh, when you sign up for Medium. Learn more
    Never miss a story from Erin Greenhalgh