Make your Python Code More Readable with Custom Exceptions

preview_player
Показать описание
How to make your Python code more readable with custom exception classes. In this screencast I'll walk you through a simple code example that demonstrates how you can use custom exception classes in your Python code to make it easier to understand, easier to debug, and more maintainable.

Рекомендации по теме
Комментарии
Автор

Expecting the one inheriting Exception class, rather than the pre existing one, Best videos so far

Taragurung
Автор

Great video, you're really good at explanations. Keep it up!

Lavamar
Автор

clears many things in my mind. thanks for the enlightment.

yapayzeka
Автор

raise NameTooShortError(name) works without any constructor and prints out the value into the console? How come?

優さん-nm
Автор

What are the thoughts about adding a __str__ method in the NameTooShortError class and then returning 'Name too short' . Wouldn't the error message string come across appropriately as defined in the class when the exception is raised?

arkster
Автор

You said don't overdo? What does overdo mean here and why is it bad?

優さん-nm
Автор

Just curious, you can achieve the same with try and catch right?

sriramraghunathan