Message414838
The documentation doesn't say that assert statements are the only place AssertionError is raised, so I don't think it's incorrect.
> From this, one can infer the guarantee "the -O flag will suppress AssertionError exceptions from being raised".
I don't think that follows from what the documentation says. It's only talking about assert statements.
This is equivalent to StopIteration: it is commonly raised by exhausting iterators, but it can be raised elsewhere. Or KeyError: the docs say "Raised when a mapping (dictionary) key is not found in the set of existing keys", but I've raised them in my own code.
> An assert[{add reference to `assert` definition}] statement fails, or a unit testing related assert{...}() callable detects an assertion violation.
I think that's also misleading, and not an improvement. Why focus just on testing? It can certainly be raised elsewhere.
If anything, I think maybe add a note at the top of the list of Concrete Exceptions saying these are common ways these exceptions are raised, but they can be raised elsewhere. But I'm -0 on such a change. |
|
Date |
User |
Action |
Args |
2022-03-10 10:42:05 | eric.smith | set | recipients:
+ eric.smith, tfish2 |
2022-03-10 10:42:05 | eric.smith | set | messageid: <1646908925.14.0.445309231194.issue46972@roundup.psfhosted.org> |
2022-03-10 10:42:05 | eric.smith | link | issue46972 messages |
2022-03-10 10:42:05 | eric.smith | create | |
|