Message321784
The documentation for ValueError currently describes it as being "Raised when a built-in operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.", but the Python community has (quite rightly!) adopted it as the exception to raise in any system when that system is passed a value for a parameter that is type-correct but of an invalid value.
(Because what, is every library going to present a "my_library.ValueError" exception instead? That would be ridiculous.)
ValueError's documentation should drop the "a built-in operation or function" wording.
Perhaps go with something like "When raised indicates that a function or method was passed a value of the correct type but an invalid value"? |
|
Date |
User |
Action |
Args |
2018-07-17 00:51:44 | Nathaniel Manista | set | recipients:
+ Nathaniel Manista, docs@python |
2018-07-17 00:51:44 | Nathaniel Manista | set | messageid: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> |
2018-07-17 00:51:43 | Nathaniel Manista | link | issue34133 messages |
2018-07-17 00:51:42 | Nathaniel Manista | create | |
|