This is not something we necessarily have to do; just an idea.
What if instead of having a pile of functions in semesters.py we defined a Semester class that had those functions. Instead of passing floats (or strings or whatever else) around, we would pass Semester objects around, which could handle things like input validation and compensating for floating point errors.
We can discuss further at a future Webmaster Committee meeting.
This is not something we necessarily have to do; just an idea.
What if instead of having a pile of functions in
semesters.py
we defined aSemester
class that had those functions. Instead of passing floats (or strings or whatever else) around, we would passSemester
objects around, which could handle things like input validation and compensating for floating point errors.We can discuss further at a future Webmaster Committee meeting.