[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: bug or feature in enum34 py2.7 backport?
From:       Terry Reedy <tjreedy () udel ! edu>
Date:       2014-11-26 21:16:21
Message-ID: m55g00$d1c$1 () ger ! gmane ! org
[Download RAW message or body]

On 11/26/2014 10:32 AM, random832@fastmail.us wrote:

> It seems like if it is a bug to reject long where int is accepted,

I do not believe that is universally true is 2.7.  But even if it is...
Short ints were, value-wise, a subset of longs.  Thus, for example, 
binary operations could always convert the int to long and continue.  In 
3.0, short ints were removed and long renamed int.

> should be likewise considered a bug to reject ASCII-only unicode where
> str is accepted.

That would require an O(n) check.  Bytes and unicode have an ascii 
overlap when bytes are interpreted as ascii chars, but neither is a 
subset of the other.  Mixed binary operations were removed in 3.x.

-- 
Terry Jan Reedy

-- 
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic