Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-02 Thread Jorropo .
> It's much simpler to rename April 1 to February 29. That will create a gap of one 1 day beetween shity regular callendar and our new one for 2 month. An algorithm distributing leap seconds near 1 first april, is maybe more complicated but reduce side effect with the world. __

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-02 Thread Stephen J. Turnbull
Greg Ewing writes: > In light of that, I propose that the datetime module in Python 4 > be changed so that April 1 does not exist: > > >>> m31 = date(2019, 3, 31) > >>> m31 + timedelta(days = 1) > datetime.date(2019, 4, 2) > > This would remove a large amount of confusion from the worl

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Chris Angelico
On Tue, Apr 2, 2019 at 9:34 AM Jonathan Goble wrote: > > On Mon, Apr 1, 2019 at 6:12 PM Greg Ewing wrote: >> >> Obviously, removing a whole day from the year will create problems >> keeping the calendar in step with the seasons. To compensate, it >> will be necessary to add approximately 1.25 day

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Jonathan Goble
On Mon, Apr 1, 2019 at 6:12 PM Greg Ewing wrote: > Obviously, removing a whole day from the year will create problems > keeping the calendar in step with the seasons. To compensate, it > will be necessary to add approximately 1.25 days worth of leap > seconds to each year. This works out to about

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Cameron Simpson
On 02Apr2019 10:43, Greg Ewing wrote: Paul Moore wrote: now that Python has type inference, it should be possible for users to just type {} and have the interpreter work out which was intended from context. Or have {} return an ambiguous object that turns into a dict or set depending on what

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Greg Ewing
Anders Hovmöller wrote: Please let's all agree that April 1 is the worst day of the year. Agreed. In light of that, I propose that the datetime module in Python 4 be changed so that April 1 does not exist: >>> m31 = date(2019, 3, 31) >>> m31 + timedelta(days = 1) datetime.date(2019, 4, 2) Th

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Greg Ewing
Paul Moore wrote: now that Python has type inference, it should be possible for users to just type {} and have the interpreter work out which was intended from context. Or have {} return an ambiguous object that turns into a dict or set depending on what is done to it. We could call it a quict

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Dan Sommers
On 4/1/19 11:35 AM, Anders Hovmöller wrote: Please let's all agree that April 1 is the worst day of the year. I can't reproduce your problem. What version of Python are you running, and on what OS? Please show us your program, and tell us what you expected it to do and what it did that failed

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Adrien Ricocotam
Am I being fooled ? I guess yes That’s the worst idea I ever heard. Python is supposed to be easy to use, don’t change it into Rust ! On Mon 1 Apr 2019 at 22:06, Jelle Zijlstra wrote: > > > El lun., 1 abr. 2019 a las 7:28, Antoine Pietri (< > [email protected]>) escribió: > >> While the

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Jelle Zijlstra
El lun., 1 abr. 2019 a las 7:28, Antoine Pietri () escribió: > While the switch to Python 3 did an excellent job in removing some of > the old inconsistencies we had in the language, pretty much everyone > agrees that some other backwards-incompatible changes could be made to > remove some old war

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread MRAB
On 2019-04-01 19:33, Paul Moore wrote: On Mon, 1 Apr 2019 at 16:36, Anders Hovmöller wrote: Please let's all agree that April 1 is the worst day of the year. Maybe in Python 4, datetime.datetime should silently convert 1st April to the 2nd? :-P Converting silently is not Pythonic. It shoul

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Paul Moore
On Mon, 1 Apr 2019 at 16:36, Anders Hovmöller wrote: > > Please let's all agree that April 1 is the worst day of the year. Maybe in Python 4, datetime.datetime should silently convert 1st April to the 2nd? :-P Paul ___ Python-ideas mailing list Python-

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Anders Hovmöller
Please let's all agree that April 1 is the worst day of the year. > On 1 Apr 2019, at 16:27, Antoine Pietri wrote: > > While the switch to Python 3 did an excellent job in removing some of > the old inconsistencies we had in the language, pretty much everyone > agrees that some other backwards-

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Paul Moore
On Mon, 1 Apr 2019 at 15:59, Todd wrote: > Currently there is no empty set literal. This is a hold-over from when there > were no sets. Now would be a good opportunity to add one. I suggest {} > become an empty set and {:} be an empty dict. There should be no need for two styles - now that

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Todd
On Mon, Apr 1, 2019, 10:28 Antoine Pietri wrote: > While the switch to Python 3 did an excellent job in removing some of > the old inconsistencies we had in the language, pretty much everyone > agrees that some other backwards-incompatible changes could be made to > remove some old warts and bri

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Eric Fahlgren
On Mon, Apr 1, 2019 at 7:50 AM Antoine Pitrou wrote: > > And 01 / 04 / 2019 should return a April 1st datetime. > > (except in the US, of course) > Where it would of course be I / / MMXV, unless you have ISO-8601 set in which case it would be MMXV - - I

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Antoine Pitrou
On Mon, 1 Apr 2019 10:41:40 -0400 Dan Sommers <[email protected]> wrote: > On 4/1/19 10:27 AM, Antoine Pietri wrote: > > > - The / operator returns floats, which loses information when both of > > the operands are integer. In Python 4, “1 / 2” should return a > > decimal.Decimal.

Re: [Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Dan Sommers
On 4/1/19 10:27 AM, Antoine Pietri wrote: - The / operator returns floats, which loses information when both of the operands are integer. In Python 4, “1 / 2” should return a decimal.Decimal. To ease the transition, we propose to add a new “from __future__ import decimal_division” in Python 3.9

[Python-ideas] Backward-incompatible changes for Python 4

2019-04-01 Thread Antoine Pietri
While the switch to Python 3 did an excellent job in removing some of the old inconsistencies we had in the language, pretty much everyone agrees that some other backwards-incompatible changes could be made to remove some old warts and bring even more consistency to Python. Since Python 4 is getti