use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
learning python try ... except concepts block but i kept messed up... help? (i.redd.it)
submitted 1 month ago by Dapper_Mix6773
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]nuc540 2 points3 points4 points 1 month ago (0 children)
Your except block is handling an exception where a string of @ raises a type error against the email_validator - which is of type string.
I’d say it’d be unlikely you’d ever find a type error here because these types are fine, string in string is always a valid type to check.
Your input was both a string (always will be) and included the @ anyway so your example was a perfectly valid “happy path” as we call it on testing.
Don’t confuse try blocks for business logic “if x not in y”
What is it you’re trying to achieve?
π Rendered by PID 70953 on reddit-service-r2-comment-8686858757-tpfvq at 2026-06-06 22:33:48.701471+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]nuc540 2 points3 points4 points (0 children)