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
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 expre
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 N
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
[email protected]
On 09/03/2019 21:13, Jonathan Fine wrote:
I'm adopting an idea suggested by Anders and Chris.
To allow us better to focus on the main idea and purpose, I've
replaced '@' by '$' in the initial suggestion. And if the main idea is
accepted, we can if needed have an secondary discussion regarding th
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 s
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 implici
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 says
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) respon
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 th
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 pe
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 updater/re-write
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 ca
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 upgrade
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 scrip
15 matches
Mail list logo