Mar-19-2019, 01:27 AM
What's LSP? I have a degree in computer science and five years' experience with software engineering and I'm unfamiliar with the acronym.
That said, I'm confused by your final code. You don't show the use of MissingStudentValue but I'm doubtful that you pass more than two arguments to it (after all, why would you?). What you probably meant to do was to pass your two named arguments into super so that when the stack trace is printed, it shows your message, e.g.
That said, I'm confused by your final code. You don't show the use of MissingStudentValue but I'm doubtful that you pass more than two arguments to it (after all, why would you?). What you probably meant to do was to pass your two named arguments into super so that when the stack trace is printed, it shows your message, e.g.
Output:>>> raise Exception("what", "hey")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: ('what', 'hey')
That said, what are you doing that actually needs super()?