Here are the examples of the python api rightarrow.parser.Parser.parse taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
def check(ty, val):
"Checks that `val` adheres to type `ty`"
if isinstance(ty, basestring):
ty = Parser().parse(ty)
return ty.enforce(val)