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

Function ge

src/attr/validators.py:508–520  ·  view source on GitHub ↗

A validator that raises `ValueError` if the initializer is called with a number smaller than *val*. The validator uses `operator.ge` to compare the values. Args: val: Inclusive lower bound for values .. versionadded:: 21.3.0

(val)

Source from the content-addressed store, hash-verified

506
507
508def ge(val):
509 """
510 A validator that raises `ValueError` if the initializer is called with a
511 number smaller than *val*.
512
513 The validator uses `operator.ge` to compare the values.
514
515 Args:
516 val: Inclusive lower bound for values
517
518 .. versionadded:: 21.3.0
519 """
520 return _NumberValidator(val, ">=", operator.ge)
521
522
523def gt(val):

Callers 1

Calls 1

_NumberValidatorClass · 0.85

Tested by 1