Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81610

Re: bug or feature in enum34 py2.7 backport?

From Terry Reedy <tjreedy@udel.edu>
Subject Re: bug or feature in enum34 py2.7 backport?
Date 2014-11-26 16:16 -0500
References <1b49aa55-ba5f-4e70-8ddb-ae5dea3a40da@googlegroups.com> <1417010748.2940071.195658861.2859C26B@webmail.messagingengine.com> <CAPTjJmo8KbZbk4etqMqvOqrAN6p3J7cQDhdoMPTBysQWfbxOuw@mail.gmail.com> <1417015925.2961473.195688745.6F0FC175@webmail.messagingengine.com>
Newsgroups comp.lang.python
Message-ID <mailman.16354.1417036626.18130.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

bug or feature in enum34 py2.7 backport? Mark Summerfield <list@qtrac.plus.com> - 2014-11-26 03:29 -0800
  Re: bug or feature in enum34 py2.7 backport? random832@fastmail.us - 2014-11-26 09:05 -0500
  Re: bug or feature in enum34 py2.7 backport? Chris Angelico <rosuav@gmail.com> - 2014-11-27 01:40 +1100
    Re: bug or feature in enum34 py2.7 backport? Mark Summerfield <list@qtrac.plus.com> - 2014-11-26 07:14 -0800
      Re: bug or feature in enum34 py2.7 backport? Chris Angelico <rosuav@gmail.com> - 2014-11-27 02:17 +1100
  Re: bug or feature in enum34 py2.7 backport? random832@fastmail.us - 2014-11-26 10:32 -0500
  Re: bug or feature in enum34 py2.7 backport? Chris Angelico <rosuav@gmail.com> - 2014-11-27 02:46 +1100
  Re: bug or feature in enum34 py2.7 backport? Ethan Furman <ethan@stoneleaf.us> - 2014-11-26 08:58 -0800
  Re: bug or feature in enum34 py2.7 backport? Terry Reedy <tjreedy@udel.edu> - 2014-11-26 16:16 -0500

csiph-web