This commit is contained in:
Richard Jones
2011-11-17 16:40:06 +11:00
parent 452123f0bb
commit d26ba29b2d
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -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".
----
+4 -3
View File
@@ -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".
----