This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Howdy all.
I've recently undertaken the task of writing my own little game in Python. So far it's been... difficult. But, I'm not here to whine! I'm here to ask a question. I have some beefy classes going on, and some of them depend on user input to be instantiated. Naturally, this means there's a lot of room for invalid inputs. So, my question is thus: What's the best practice when doing error handling for classes. Do you handle it in the class, do you handle it before it's passed, or do you offload the error handling to elsewhere?
Sorry if this question makes no sense, I don't really know how else to put it!
Thanks in advance for your time. Stay frosty.
Subreddit
Post Details
- Posted
- 7 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnpython...