Re: [TSBOAPOOOWTDI]using names from modules

2017-11-05 Thread Paul Moore
On 5 November 2017 at 13:54, Stefan Ram wrote: > Paul Moore writes: >>But regardless, the Zen isn't intended to be taken quite as literally >>as the OP was trying to do. It's a statement of principles, not a set >>of rules. > > What I am looking

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-05 Thread Steve D'Aprano
On Mon, 6 Nov 2017 12:54 am, Stefan Ram wrote: > Paul Moore writes: >>But regardless, the Zen isn't intended to be taken quite as literally >>as the OP was trying to do. It's a statement of principles, not a set >>of rules. > > What I am looking for is a default notation

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-05 Thread Paul Moore
On 5 November 2017 at 01:19, Steve D'Aprano wrote: > On Sun, 5 Nov 2017 06:42 am, Stefan Ram wrote: > >> What is the one way to do it? > > There is no philosophy of "one way to do it" in Python, that is a > misunderstanding (possibly deliberate...) spread about by Perl

Re: Zen of Python “obvious way to do it” (was: [TSBOAPOOOWTDI]using names from modules)

2017-11-05 Thread Steve D'Aprano
On Sun, 5 Nov 2017 12:49 pm, Ben Finney wrote: > Steve D'Aprano writes: > >> On Sun, 5 Nov 2017 06:42 am, Stefan Ram wrote: >> >> > What is the one way to do it? >> >> There is no philosophy of "one way to do it" in Python, that is a >> misunderstanding (possibly

Zen of Python “obvious way to do it” (was: [TSBOAPOOOWTDI]using names from modules)

2017-11-04 Thread Ben Finney
Steve D'Aprano writes: > On Sun, 5 Nov 2017 06:42 am, Stefan Ram wrote: > > > What is the one way to do it? > > There is no philosophy of "one way to do it" in Python, that is a > misunderstanding (possibly deliberate...) spread about by Perl users, > to contrast

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-04 Thread Steve D'Aprano
On Sun, 5 Nov 2017 06:42 am, Stefan Ram wrote: > What is the one way to do it? There is no philosophy of "one way to do it" in Python, that is a misunderstanding (possibly deliberate...) spread about by Perl users, to contrast Python from Perl's "more than one way to do it". The Zen of Python

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-04 Thread Terry Reedy
On 11/4/2017 3:42 PM, Stefan Ram wrote: What is better: ... import math ... ... math.cos ... ... or ... from math import cos ... ... cos ... ... ? (To me, the first is more readable, because at the site where »math.cos« is used, it is made clear that »cos« comes from math.

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-04 Thread Cameron Simpson
On 04Nov2017 20:59, Peter J. Holzer wrote: On 2017-11-04 19:42, Stefan Ram wrote: What is better: ... import math ... ... math.cos ... or ... from math import cos ... ... cos ... ? (To me, the first is more readable, because at the site

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-04 Thread Peter J. Holzer
On 2017-11-04 19:42, Stefan Ram wrote: > What is better: > > ... > import math > ... > ... math.cos ... > ... > > or > > ... > from math import cos > ... > ... cos ... > ... > > ? > > (To me, the first is more readable, because at the site > where »math.cos« is