loading...

re: Why do all the dynamic languages catch name errors by default? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: The simple explanation would be that all runtime errors should throw an exception. The open-ended catch would then need to catch them. Better to ...
 

I understand them wanting to have name errors be catchable, but they don't have to be part of the standard exception class. Why couldn't NameError just not be a subtype of StandardError or Exception? You could still catch it if you wanted with except BaseException or except (Exception, NameError).

code of conduct - report abuse