New submission from David Lin email@example.com:
exception OverflowError Raised when the result of an arithmetic operation is too large to be represented. This cannot occur for integers (which would rather raise MemoryError than give up). However, for historical reasons, OverflowError is sometimes raised for integers that are outside a required range. Because of the lack of standardization of floating point exception handling in C, most floating point operations are not checked.
In sentence: "which would rather raise MemoryError than give up", should we use "then" instead of "than"?
Thanks, David Lin
---------- assignee: docs@python components: Documentation messages: 324720 nosy: davidlin, docs@python priority: normal severity: normal status: open title: Typo: "which would rather raise MemoryError than give up", than or then? versions: Python 3.7
Josh Rosenberg firstname.lastname@example.org added the comment:
"than" is correct; "giving up" in this context would mean "not even trying to allocate the memory and just preemptively raising OverflowError, like non-integer numeric types with limited ranges". Rather than giving up that way, it chooses to try to allocate the huge integer and raises a MemoryError only if that fails.
---------- nosy: +josh.r
Mark Dickinson email@example.com added the comment:
See https://www.collinsdictionary.com/dictionary/english/would-rather for an example:
I have no information one way or the other, but I would rather he do it than not do it.
---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed