-
-
Save titouanc/4461121 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pas besoin de redéfinir les méthodes __init__ et __repr__ puisqu'elles sont déjà définies dans Exception | |
class ErrDeg(Exception) : | |
pass | |
#Ou alors pour leur donner un fonctionnement supplémentaire | |
class ErrDeg(Exception): | |
def __init__(self, deg1, deg2): | |
self.value = str(deg1)+" != "+str(deg2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment