pythonwrench.collections.prop module

pythonwrench.collections.prop.all_eq(it: Iterable[T], eq_fn: Callable[[T, T], bool] | None = None) bool[source]

Returns true if all elements in iterable are equal.

Note: This function returns True for iterable that contains 0 or 1 element.

pythonwrench.collections.prop.all_ne(it: Iterable[T], ne_fn: Callable[[T, T], bool] | None = None, use_set: bool = False) bool[source]

Returns true if all elements in iterable are differents.

Note: This function returns True for iterable that contains 0 or 1 element.

pythonwrench.collections.prop.is_full(it: Iterable[T], eq_fn: Callable[[T, T], bool] | None = None) bool[source]

Returns true if all elements in iterable are equal.

Note: This function returns True for iterable that contains 0 or 1 element.

pythonwrench.collections.prop.is_sorted(x: Iterable[Any], *, reverse: bool = False, strict: bool = False) bool[source]
pythonwrench.collections.prop.is_unique(it: Iterable[T], ne_fn: Callable[[T, T], bool] | None = None, use_set: bool = False) bool[source]

Returns true if all elements in iterable are differents.

Note: This function returns True for iterable that contains 0 or 1 element.