diff --git a/peps/pep-0726.rst b/peps/pep-0726.rst index 40912dba7..b40647684 100644 --- a/peps/pep-0726.rst +++ b/peps/pep-0726.rst @@ -59,7 +59,7 @@ For example def validate(n): n = int(n) if n <= 0: - raise ValueError('non-negative integer expected') + raise ValueError('Positive integer expected') return n def __setattr__(name, value): @@ -105,7 +105,7 @@ For example >>> mplib.dps = 0 Traceback (most recent call last): ... - ValueError: non-negative integer expected + ValueError: Positive integer expected Existing Options @@ -279,7 +279,7 @@ See `related issue `__ for other details. -Other stdlib modules also come with attributes which can be overriden (as a +Other stdlib modules also come with attributes which can be overridden (as a feature) and some input validation here could be helpful. Examples: :py:obj:`threading.excepthook`, :py:obj:`warnings.showwarning`, :py:obj:`io.DEFAULT_BUFFER_SIZE` or :py:obj:`os.SEEK_SET`.