Skip to content
Snippets Groups Projects
Commit 193d13e3 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

docs fixed a bit

parent cffe9c8f
No related branches found
No related tags found
No related merge requests found
......@@ -18,17 +18,11 @@ Satella lets you express lambdas in a Pythonic way, eg:
assert(p(2) and not p(1))
This behaviour extends to operators, item procurement and attr procurement. The only exception is the length,
which due to Python limitations (namely __len__ being allowed to return an int only) is called
via it's method .length(), eg:
::
p = x.length() == 2
assert(p([1, 2]) and not p([3])
This behaviour extends to operators, item procurement and attr procurement.
The only exceptions are operator subject to Python limitations (ie.
__len__ being allowed to return an int only for example) is called.
These are mentioned in the docs below.
You can also piece together multiple predicates.
Because of Python limitations please use & and | operators in place of and and or.
......
......@@ -116,7 +116,7 @@ class Predicate:
"""
Check if given value has the correct schema.
The schema is the same as in
:py:meth:`satella.coding.structures.DictObject.is_valid_schema`
:py:meth:`~satella.coding.structures.DictObject.is_valid_schema`
"""
def is_schema_correct(v):
return DictObject(self.operation(v)).is_valid_schema(schema, **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment