On 11/2/23 00:42, Simon Connah via Python-list wrote: > Basically I'm writing unit tests and one of them passess in a string > with an invalid email address. I need to be able to check the string > to see if it is a valid email so that the unit test passess.
If you truly have managed to code an RFC-compliant verifier, I commend you. > Valid as in conforms to the standard. Although having looked at the > standard that might be more difficult than originally planned. You'll have to read the relevant RFCs. Lots of corner cases! From what I can see virtually no one on the internet gets it right, judging by the number of times I have valid email addresses flagged as not valid by poor algorithms. -- https://mail.python.org/mailman/listinfo/python-list