MCPcopy
hub / github.com/python-attrs/attrs / lt

Function lt

src/attr/validators.py:478–490  ·  view source on GitHub ↗

A validator that raises `ValueError` if the initializer is called with a number larger or equal to *val*. The validator uses `operator.lt` to compare the values. Args: val: Exclusive upper bound for values. .. versionadded:: 21.3.0

(val)

Source from the content-addressed store, hash-verified

476
477
478def lt(val):
479 """
480 A validator that raises `ValueError` if the initializer is called with a
481 number larger or equal to *val*.
482
483 The validator uses `operator.lt` to compare the values.
484
485 Args:
486 val: Exclusive upper bound for values.
487
488 .. versionadded:: 21.3.0
489 """
490 return _NumberValidator(val, "<", operator.lt)
491
492
493def le(val):

Callers

nothing calls this directly

Calls 1

_NumberValidatorClass · 0.85

Tested by

no test coverage detected