How to do this in Python...

Paul Rubin phr-n2003b at NOSPAMnightsong.com
Thu Jan 23 19:15:16 EST 2003


Chad Netzer <cnetzer at mail.arc.nasa.gov> writes:
> match = re.match(pattern, string)
> if match is not None:
>     # do something with match object
> 
> Since if's can test for more than boolean values, and match is defined 
> to return None when it fails to match anything, not a False value.  

Can a match object ever test as false?




More information about the Python-list mailing list