Closed PrakharPythonProgrammer closed 3 years ago
It's an exception defined in Stylesheet.py. In Python 1, exceptions were just string literals.
That means we cannot use it in Python 3 ?
On Tue, May 18, 2021, 08:33 Guido van Rossum @.***> wrote:
It's an exception defined in Stylesheet.py. In Python 1, exceptions were just string literals.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PrakharPythonProgrammer/Grail-0.6/issues/4#issuecomment-842789707, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUCW2RZMJIHKL7S5H7P36ELTOHKJJANCNFSM45BTAOTA .
No, you just change this line:
UndefinedStyle = 'UndefinedStyle'
into this:
class UndefinedStyle(Exception):
pass
Okay I got it we are inheriting the Exception class which is the base class of every exception. Thank you :)
On Tue, May 18, 2021, 09:34 Guido van Rossum @.***> wrote:
No, you just change this line:
UndefinedStyle = 'UndefinedStyle'
into this:
class UndefinedStyle(Exception): pass
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PrakharPythonProgrammer/Grail-0.6/issues/4#issuecomment-842807960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUCW2RY2DMTDL5CGMI3MAF3TOHRLNANCNFSM45BTAOTA .
I have searched on internet and as far as my knowledge there is no exception like UndefinedStyle. Can you tell @gvanrossum what kind of error did you want it to handle ? Maybe the name for that exception is changed.