rjones777 / pwp-capstones

0 stars 0 forks source link

nice job initializing highest_rating #2

Open ad3429 opened 6 years ago

ad3429 commented 6 years ago

https://github.com/rjones777/pwp-capstones/blob/master/TomeRater_Project/TomeRater.py#L184

I've seen many projects where the learner initializes this value to 0, but that is not considered good practice. Nice job correctly setting it to some impossible value such as negative infinity.

rjones777 commented 6 years ago

I still don’t quite understand the ‘why’ on this type of initialization but it’s done on a couple projects in the course and figured it would apply here in this function. I’ve made them work with zero as well but figured it wouldn’t hurt to use it here.