[issue34601] Typo: "which would rather raise MemoryError than give up", than or then?
New submission from David Lin <david.dl.lin@nokia-sbell.com>: https://docs.python.org/3/library/exceptions.html 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 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34601> _______________________________________
Josh Rosenberg <shadowranger+python@gmail.com> 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 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34601> _______________________________________
Mark Dickinson <dickinsm@gmail.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 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34601> _______________________________________
participants (3)
-
David Lin
-
Josh Rosenberg
-
Mark Dickinson