Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-16 Thread Markus Unterwaditzer
On Wed, Jan 15, 2014 at 01:22:44PM +0100, "Martin v. Löwis" wrote: > Am 12.01.14 18:39, schrieb Nachshon David Armon: > >>> I propose that this new version of python use the python 3 unicode model. > >>> As the version of python will be fully compatible with both python 2 and > >>> with python 3 bu

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Steven D'Aprano
On Wed, Jan 15, 2014 at 09:25:04AM -0500, Eric V. Smith wrote: > On 1/15/2014 8:21 AM, Chris Angelico wrote: > > On Wed, Jan 15, 2014 at 11:22 PM, "Martin v. Löwis" > > wrote: > >> I don't think that it is possible to write an interpreter that is fully > >> compatible for all it accepts. Would yo

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Serhiy Storchaka
15.01.14 16:34, Antoine Pitrou написав(ла): If you explicitly create a long the L will always be printed: long(0) 0L Hey! long is not in common subset of Python 2 and Python 3. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Chris Angelico
On Thu, Jan 16, 2014 at 1:25 AM, Eric V. Smith wrote: >> Easiest fix for that would be to have long.__repr__ omit the L tag. >> Then it'll do the same as it would in Py3. > > I think Martin's point is not this specific thing, but that such a > subset would be useless. Would you drop dict.items() b

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Antoine Pitrou
On Wed, 15 Jan 2014 16:31:17 +0200 Serhiy Storchaka wrote: > 15.01.14 14:22, "Martin v. Löwis" написав(ла): > > I don't think that it is possible to write an interpreter that is fully > > compatible for all it accepts. Would you think that the program > > > > print(repr(2**80).endswith("L")) > > >

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Serhiy Storchaka
15.01.14 14:22, "Martin v. Löwis" написав(ла): I don't think that it is possible to write an interpreter that is fully compatible for all it accepts. Would you think that the program print(repr(2**80).endswith("L")) is in the subset that should be supported by both Python 2 and Python 3? Notic

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Eric V. Smith
On 1/15/2014 8:21 AM, Chris Angelico wrote: > On Wed, Jan 15, 2014 at 11:22 PM, "Martin v. Löwis" > wrote: >> I don't think that it is possible to write an interpreter that is fully >> compatible for all it accepts. Would you think that the program >> >> print(repr(2**80).endswith("L")) >> >> is

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Chris Angelico
On Wed, Jan 15, 2014 at 11:22 PM, "Martin v. Löwis" wrote: > I don't think that it is possible to write an interpreter that is fully > compatible for all it accepts. Would you think that the program > > print(repr(2**80).endswith("L")) > > is in the subset that should be supported by both Python 2

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Antoine Pitrou
On Wed, 15 Jan 2014 13:22:44 +0100 "Martin v. Löwis" wrote: > Am 12.01.14 18:39, schrieb Nachshon David Armon: > >>> I propose that this new version of python use the python 3 unicode model. > >>> As the version of python will be fully compatible with both python 2 and > >>> with python 3 but NOT

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-15 Thread Martin v. Löwis
Am 12.01.14 18:39, schrieb Nachshon David Armon: >>> I propose that this new version of python use the python 3 unicode model. >>> As the version of python will be fully compatible with both python 2 and >>> with python 3 but NOT necsesarily with all existing code in either. It is >>> designed as a

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-12 Thread Nachshon David Armon
On Sun, Jan 12, 2014 at 3:58 PM, Nick Coghlan wrote: > > On 12 Jan 2014 23:39, "Nachshon David Armon" > wrote: >> >> I propose that this new version of python use the python 3 unicode model. >> As the version of python will be fully compatible with both python 2 and >> with python 3 but NOT necs

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-12 Thread Nick Coghlan
On 12 Jan 2014 23:39, "Nachshon David Armon" wrote: > > Hi, > I am Nachshon and this is my first post to the python mailing list. > > I have been porting some libraries from python 2 to python 3 recently with the goal of a common codebase that will run on both versions. I was thinking it would mak

Re: [Python-Dev] Common subset of python 2 and python 3

2014-01-12 Thread Nick Coghlan
Hi Nachson, Python 2.7 with the -3 warning flag covers most of this, while using tox to run automated tests under both 2.x and 3.x should cover the rest (tox is also useful for checking code runs under Python 2.6, even if you normally use a newer version). Is there anything in particular you feel

[Python-Dev] Common subset of python 2 and python 3

2014-01-12 Thread Nachshon David Armon
Hi, I am Nachshon and this is my first post to the python mailing list. I have been porting some libraries from python 2 to python 3 recently with the goal of a common codebase that will run on both versions. I was thinking it would make my life, and a lot of other developers as well, a lot easier