Re: [Python-ideas] Code version evolver

2019-03-11 Thread Steven D'Aprano
On Mon, Mar 11, 2019 at 09:38:21PM +0100, francismb wrote: > Hi, > I would like to discuss on the idea of a code (minor) version > evolver/re-writer (or at least a change indicator). Let's see one wants > to add a feature on the next version and some small grammar change is > needed, then the

Re: [Python-ideas] Code version evolver

2019-03-11 Thread Paul Moore
On Mon, 11 Mar 2019 at 20:39, francismb wrote: > > Hi, > I would like to discuss on the idea of a code (minor) version > evolver/re-writer (or at least a change indicator). Let's see one wants > to add a feature on the next version and some small grammar change is > needed, then the script

[Python-ideas] Code version evolver

2019-03-11 Thread francismb
Hi, I would like to discuss on the idea of a code (minor) version evolver/re-writer (or at least a change indicator). Let's see one wants to add a feature on the next version and some small grammar change is needed, then the script upgrades/evolves first the current code and then the new version

Re: [Python-ideas] Left arrow and right arrow operators

2019-03-11 Thread francismb
Hi Greg, On 3/9/19 1:42 AM, Greg Ewing wrote: > Do you really want > to tell them that all their code is now wrong? Of course not, at least not so promptly. But, would it be still a problem if the update to a new version (let say from 3.X to next(3.X)) is done through some kind of

Re: [Python-ideas] OT: Respectful behaviour

2019-03-11 Thread Rhodri James
On 11/03/2019 15:37, Chris Angelico wrote: On Tue, Mar 12, 2019 at 2:30 AM Jonathan Fine wrote: Someone made a proposal whose purpose was not clear. A second person criticised the first person for this. A third person (me) referred to the public guidelines for the use of this list. A fourth

Re: [Python-ideas] OT: Respectful behaviour

2019-03-11 Thread Chris Angelico
On Tue, Mar 12, 2019 at 2:30 AM Jonathan Fine wrote: > > Someone made a proposal whose purpose was not clear. A second person > criticised the first person for this. A third person (me) referred to > the public guidelines for the use of this list. A fourth person, in a > new thread, accused the

Re: [Python-ideas] OT: Respectful behaviour

2019-03-11 Thread Jonathan Fine
Someone made a proposal whose purpose was not clear. A second person criticised the first person for this. A third person (me) referred to the public guidelines for the use of this list. A fourth person, in a new thread, accused the third person of hijacking the thread. The third person (me)

[Python-ideas] OT: Respectful behaviour

2019-03-11 Thread Rhodri James
On 11/03/2019 12:17, Jonathan Fine wrote: Steven D'Aprano wrote: Some weeks ago, you started a discussion here about "Clearer Communication". Here's another suggestion to help: don't expect your readers to either guess, or infer from the code, what your proposal means. As the Zen of Python

Re: [Python-ideas] from __future__ import runtime_default_kwargs

2019-03-11 Thread Jonathan Fine
Steven D'Aprano wrote: > Some weeks ago, you started a discussion here about "Clearer > Communication". Here's another suggestion to help: don't expect your > readers to either guess, or infer from the code, what your proposal > means. As the Zen of Python says: > > Explicit is better than

Re: [Python-ideas] from __future__ import runtime_default_kwargs

2019-03-11 Thread Steven D'Aprano
Hi James, Some weeks ago, you started a discussion here about "Clearer Communication". Here's another suggestion to help: don't expect your readers to either guess, or infer from the code, what your proposal means. As the Zen of Python says: Explicit is better than implicit. Looking at your

Re: [Python-ideas] from __future__ import runtime_default_kwargs

2019-03-11 Thread Jonathan Fine
Thank you, James, for your idea. For the benefit of those who may not know, please explain the problem you wish to solve. That way we could suggest, discuss and compare other solutions. -- Jonathan ___ Python-ideas mailing list Python-ideas@python.org

Re: [Python-ideas] from __future__ import runtime_default_kwargs

2019-03-11 Thread Chris Angelico
On Mon, Mar 11, 2019 at 10:28 PM James Lu wrote: > > When > > from __future__ import runtime_default_kwargs > > > > Is run, > > def a(b=1, c=b+2, d=[]): > pass > > behaves as (if the peephole optimizer didn’t exist) > > def a(b=None, c=None): > if b is None: > b = 1 > if c is

[Python-ideas] from __future__ import runtime_default_kwargs

2019-03-11 Thread James Lu
When from __future__ import runtime_default_kwargs Is run, def a(b=1, c=b+2, d=[]): pass behaves as (if the peephole optimizer didn’t exist) def a(b=None, c=None): if b is None: b = 1 if c is None: c = b + 2 if d is None: d = [] i.e. the keyword

Re: [Python-ideas] New use for the 'in' keyword.

2019-03-11 Thread Jonathan Fine
Hi Simon You've suggested allowing import numpy as np import math in np as an improvement on from somewhere import * But you can get a similar result already, by writing in your package import .aaa as np and within mypackage/aaa.py writing from numpy import * from math