@AlSweigart
If it were me, I would put it in your custom exception.
Conversation
Notices
-
Embed this notice
Blaise Pabón - controlpl4n3 (blaise@hachyderm.io)'s status on Wednesday, 13-Nov-2024 00:08:39 JST Blaise Pabón - controlpl4n3 -
Embed this notice
Al Sweigart (alsweigart@mastodon.social)'s status on Wednesday, 13-Nov-2024 00:08:40 JST Al Sweigart Python question: I am writing MyLibrary which has a container MyClass. Should the __getitem__() method for MyClass raise KeyError or my own custom MyLibraryKeyError?
-
Embed this notice