diff --git a/README.txt b/README.txt index e8ab8a7..465bb5d 100644 --- a/README.txt +++ b/README.txt @@ -29,13 +29,14 @@ And some named parsing: >>> r.fixed ('there', ) -A ValueError will be raised if there is no match: +None will be returned if there is no match: >>> r = parse('hello {name:w}', 'hello 12') - ValueError: ... + >>> print r + None See also the unit tests at the end of the module for some more -examples. +examples. Run those with "python -m parse". ---- diff --git a/parse.py b/parse.py index 24af173..41e7f6c 100644 --- a/parse.py +++ b/parse.py @@ -33,13 +33,14 @@ And some named parsing: >>> r.fixed ('there', ) -A ValueError will be raised if there is no match: +None will be returned if there is no match: >>> r = parse('hello {name:w}', 'hello 12') - ValueError: ... + >>> print r + None See also the unit tests at the end of the module for some more -examples. +examples. Run those with "python -m parse". ----