UWPCE-PythonCert/IntroToPython — pull request #80 by imdavis (2014-11-23 19:41:57+00:00)
Title: Session 07 Assignment: Circle Class

The circle module does what it should, as far as I can tell. Passes all of my tests in the "test_circle.py" pytest module. I used assertions in the radius.setter and diameter.setter to throw an Assertion if someone tries to initialize a Circle object with a negative or zero radius (or diameter), since that doesn't make sense.

Not sure if this is right way to do this. I remember Chris saying something about how assertions may not be the right way to handle this when he was discussing the "vector.py" example. Something about how the assertions would be stripped out if the code was run in optimized mode. Would appreciate feedback on if there is a more robust way such a thing should be handled.