4 ms·
You could make a property in Python that validates it's given value and throws a ValueError if it's not an email. 6 lines of code max, with maybe two tests.
by orf 10y ago
You could make a property in Python that validates it's given value and throws a ValueError if it's not an email. 6 lines of code max, with maybe two tests.
- deleted 10y ago[deleted]
- tigershark 10y agoHow can this prevent you at compile time to pass a username instead of an email?