New answers tagged regular-expressions
I would definitely go for the return None option. Raising an exception may increase readability (although I doubt it) on the function itself, but handling it is messier. If you return None, from the caller function you can do the following: citation = check_case_citation("Case 145/80") if citation: # Do something else: # Do something else while, if ...
Top 50 recent answers are included