On Thu, Jul 31, 2008 at 10:32 AM, Neal Norwitz <[EMAIL PROTECTED]> wrote: > On Wed, Jul 30, 2008 at 9:36 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> On Tue, Jul 29, 2008 at 10:07 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> >> wrote: >>>> +1 OverflowErrors should probably by reserved for numeric overflows. >>> >>> In a sense, passing sys.maxsize as a string size *is* a numeric >>> overflow - the size can't be represented in the available variable. >> >> I'm sure this is the source of the confusion. The problem is that if >> you specify a small enough value that you *don't* get into >> unrepresentable sizes, but still very large, you do get a MemoryError. >> For continuity it would be better to treat both the same, i.e. use >> MemoryError consistently. > > I just checked in a bunch of security patches that do not follow this > convention. I wanted to avoid changing the patches we exchanged on > the security list. The errors should be changed and made consistent. > The patches were checked in to 2.4, 2.5, and trunk. Can someone make > sure to forward port to 3k?
Let's first forward port these to 3k. In 2.6, I think we should leave the exceptions as they were. In 3.0 I think it's okay to change such OverflowErrors into MemoryErrors. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com