Stdlib, what's in, what's out (was: "Energy Efficiency across Programming Languages")

2017-09-18 Thread John Ladasky
On Monday, September 18, 2017 at 5:13:58 PM UTC-7, MRAB wrote: > On 2017-09-18 23:08, b...@g...com wrote: > > My rationale is simple, the authors of the libraries are not tied into the > > (c)Python release cycle, the PEP process or anything else, they can just > > get on with it. > > > > Consi

Re: [Scons-dev] SCons 3.0.0 release

2017-09-18 Thread Russel Winder
Bill, Excellent. Thanks for putting in so much effort so as to make this happen. Can we switch to hosting the release tarballs on GitHub as the primary location? -- Russel. = Dr Russel Winder t: +44 20 7585 2200

Re: Old Man Yells At Cloud

2017-09-18 Thread Dan Sommers
On Tue, 19 Sep 2017 01:56:29 +, Stefan Ram wrote: > Steve D'Aprano writes: >>It is true that binary floats have some unexpected properties. They >>aren't the real numbers that we learn in maths. But most people who >>have been to school have years of experience with calculators training >>th

Re: Old Man Yells At Cloud

2017-09-18 Thread Steve D'Aprano
On Tue, 19 Sep 2017 12:31 am, Ben Bacarisse wrote: > Was the result of 1/2 determined > by a poll to find out what most people expected? No. It was determined by the fact that a decade or more of experience with the language demonstrated that the Python 2 behaviour was a terrible mistake and a co

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-18 Thread Rick Johnson
On Saturday, September 16, 2017 at 9:01:41 PM UTC-5, Steve D'Aprano wrote: > [...] > - a giant down-pointing arrowhead, about three inches tall, > which turns grey when you mouse-over it but doesn't do > anything when clicked; Oh, it does something, just not an _obvious_ something. LOL. I tried to

Re: [Tutor] beginning to code

2017-09-18 Thread Steve D'Aprano
On Mon, 18 Sep 2017 11:00 pm, Rustom Mody wrote: >> {None, 0, "" {}, []} → False >> Everything_else → True >> >> This mapping is neither obvious nor trivial > > Sufficiently non-obvious that I missed the key element: > {None, 0, "" {}, [], False} → False I thought it was intentional, because th

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-18 Thread MRAB
On 2017-09-18 23:08, breamore...@gmail.com wrote: On Monday, September 18, 2017 at 10:21:55 PM UTC+1, John Ladasky wrote: On Saturday, September 16, 2017 at 11:01:03 PM UTC-7, Terry Reedy wrote: > On 9/16/2017 7:04 PM, b...@g...com wrote: > The particular crippler for CLBG problems is the non-u

Re: Hatch - A modern project, package, and virtual env manager

2017-09-18 Thread ofekmeister
Hatch now supports per-project package management! https://github.com/ofek/hatch/blob/master/HISTORY.rst#0140 -- https://mail.python.org/mailman/listinfo/python-list

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-18 Thread Ethan Furman
On 09/17/2017 01:14 AM, Steve D'Aprano wrote: On Sun, 17 Sep 2017 04:16 pm, Terry Reedy wrote: On 9/17/2017 2:04 AM, Chris Angelico wrote: On Sun, Sep 17, 2017 at 4:00 PM, Terry Reedy wrote: The numerical extensions have been quasi-official in the sense that at least 3 language enhancements

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-18 Thread breamoreboy
On Monday, September 18, 2017 at 10:21:55 PM UTC+1, John Ladasky wrote: > On Saturday, September 16, 2017 at 11:01:03 PM UTC-7, Terry Reedy wrote: > > On 9/16/2017 7:04 PM, b...@g...com wrote: > > > The particular crippler for CLBG problems is the non-use of numpy in > > numerical calculations, s

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-18 Thread Terry Reedy
On 9/18/2017 5:21 PM, John Ladasky wrote: On Saturday, September 16, 2017 at 11:01:03 PM UTC-7, Terry Reedy wrote: On 9/16/2017 7:04 PM, b...@g...com wrote: The particular crippler for CLBG problems is the non-use of numpy in numerical calculations, such as the n-body problem. Numerical pyth

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-18 Thread John Ladasky
On Saturday, September 16, 2017 at 11:01:03 PM UTC-7, Terry Reedy wrote: > On 9/16/2017 7:04 PM, b...@g...com wrote: > The particular crippler for CLBG problems is the non-use of numpy in > numerical calculations, such as the n-body problem. Numerical python > extensions are over two decades ol

SCons 3.0.0 release

2017-09-18 Thread Bill Deegan
SCons - a software construction tool Release Notes This is SCons, a tool for building software (and other files). SCons is implemented in Python, and its "configuration files" are actually Python scripts, allowing you to use the full power of a r

Re: Old Man Yells At Cloud

2017-09-18 Thread Ben Bacarisse
bartc writes: > On 18/09/2017 15:04, Gregory Ewing wrote: >> Dennis Lee Bieber wrote: >>> Pascal >>> provides print()/println() [okay, not /statements/ but /procedures/] >> >> Actually write/writeln, and although they used parens like >> procedures, they had special syntax for output formatting >

Re: Old Man Yells At Cloud

2017-09-18 Thread Roel Schroeven
Steve D'Aprano schreef op 17/09/2017 20:49: On Mon, 18 Sep 2017 04:09 am, Tim Chase wrote: So, you don't like the extra parentheses with print. But you don't mind the parentheses in sys.stderr.write (16 chars, versus five for print) or having to manually concatenate the strings and manually add a

Re: Old Man Yells At Cloud

2017-09-18 Thread Roel Schroeven
Steve D'Aprano schreef op 17/09/2017 3:09: On Sun, 17 Sep 2017 04:00 am, Stefan Ram wrote: Steve D'Aprano writes: "Hi, I've been programming in Python for what seems like days now, and here's all the things that you guys are doing wrong. I never ever have written a line of Python 2. I star

Re: [Tutor] beginning to code

2017-09-18 Thread Steve D'Aprano
On Mon, 18 Sep 2017 10:54 pm, Rustom Mody wrote: > The operation > x == True > for true(!)/proper booleans x is a no-op > because True == True is True > and False == True is False > And there are no other (proper) booleans Yes, this exactly! > However because anything else can be bool-ish even

Re: [Tutor] beginning to code

2017-09-18 Thread Steve D'Aprano
On Mon, 18 Sep 2017 10:42 pm, Rick Johnson wrote: > Steve D'Aprano wrote: > >> [snip: offensive statements] >> >> Your insistence on adding the entirely superfluous, unnecessary > > Please acquaint yourself with the definition of superfluous, > as in most i have seen, the actual word "unnecessar

Re: Old Man Yells At Cloud

2017-09-18 Thread Ben Bacarisse
Steve D'Aprano writes: > To answer your question, what do I mean by int/int being undefined, I'd have > to > dig into areas of maths that either weren't taught in the undergrad courses I > did, or that I've long since forgotten about. Something > about... fields? > This is a pretty specialised

Re: [Tutor] beginning to code

2017-09-18 Thread INADA Naoki
> > > > > I can't agree with you. It's too redundant. It doesn't > > provide any information about what coder think. > > It's not about what the "coder thinks", many times what the > coder thinks is wrong, it's about writing code that is > intuitive to as wide an audience as possible. > My point

Re: Old Man Yells At Cloud

2017-09-18 Thread bartc
On 18/09/2017 15:04, Gregory Ewing wrote: Dennis Lee Bieber wrote: Pascal provides print()/println() [okay, not /statements/ but /procedures/] Actually write/writeln, and although they used parens like procedures, they had special syntax for output formatting that wasn't available to user-defi

Re: Old Man Yells At Cloud

2017-09-18 Thread Ben Bacarisse
Steve D'Aprano writes: > [...] try something more common: > > 1/2 > > Most people aren't expecting integer division, but true division, and silently > returning the wrong result (0 instead of 0.5) is a silent source of > bugs. I'm the sure that expectation depends on their background and previou

Re: Old Man Yells At Cloud

2017-09-18 Thread Gregory Ewing
Dennis Lee Bieber wrote: Pascal provides print()/println() [okay, not /statements/ but /procedures/] Actually write/writeln, and although they used parens like procedures, they had special syntax for output formatting that wasn't available to user-defined procedures, so they were at least as sp

Re: [Tutor] beginning to code

2017-09-18 Thread Chris Angelico
On Mon, Sep 18, 2017 at 11:30 PM, Antoon Pardon wrote: > Op 18-09-17 om 14:58 schreef Chris Angelico: >> On Mon, Sep 18, 2017 at 10:42 PM, Rick Johnson >> wrote: >>> (2) Python is, in essence, converting the source code >>> syntax of: >>> >>> if someObject: >>> >>> to: >>> >>>

Re: [Tutor] beginning to code

2017-09-18 Thread Paul Moore
On 18 September 2017 at 14:30, Antoon Pardon wrote: > Well that you reduce an object to a boolean value is not obvious to > begin with. A TypeError because you are treating a non-boolean as > a boolean would have been more obvious to me. More obvious, possibly - that's essentially a matter of wha

Re: Old Man Yells At Cloud

2017-09-18 Thread Thomas Jollans
On 2017-09-18 03:11, Rick Johnson wrote: > MRAB wrote: >> Rick Johnson wrote: >>> Steve D'Aprano wrote: Tim Golden wrote: [Snip: Reasons why print function is better than print statement] I've wanted to do all those things, and more. I love the new print function. For

Re: [Tutor] beginning to code

2017-09-18 Thread Antoon Pardon
Op 18-09-17 om 14:58 schreef Chris Angelico: > On Mon, Sep 18, 2017 at 10:42 PM, Rick Johnson > wrote: >> (2) Python is, in essence, converting the source code >> syntax of: >> >> if someObject: >> >> to: >> >> if BOOLEAN_VALUE_OF_SOMEOBJECT: >> >> Which, although t

Re: [Tutor] beginning to code

2017-09-18 Thread Rustom Mody
On Monday, September 18, 2017 at 6:25:09 PM UTC+5:30, Rustom Mody wrote: > On Monday, September 18, 2017 at 5:23:49 PM UTC+5:30, Rick Johnson wrote: > > On Sunday, September 17, 2017 at 8:51:38 PM UTC-5, INADA Naoki wrote: > > > > > > > > > > > > > > I would agree that testing any of those for '==

Re: [Tutor] beginning to code

2017-09-18 Thread Steve D'Aprano
On Mon, 18 Sep 2017 09:53 pm, Rick Johnson wrote: > Tell you what: test your hypothesis on non-programmers and > report back here. Why would someone do that? The purpose of source code is not to communicate with non-programmers. It is to communicate with other programmers. (If the code is execut

Re: [Tutor] beginning to code

2017-09-18 Thread Chris Angelico
On Mon, Sep 18, 2017 at 10:42 PM, Rick Johnson wrote: > (2) Python is, in essence, converting the source code > syntax of: > > if someObject: > > to: > > if BOOLEAN_VALUE_OF_SOMEOBJECT: > > Which, although the result of such a conversion (a > Boolean) will be pe

Re: [Tutor] beginning to code

2017-09-18 Thread Rustom Mody
On Monday, September 18, 2017 at 5:23:49 PM UTC+5:30, Rick Johnson wrote: > On Sunday, September 17, 2017 at 8:51:38 PM UTC-5, INADA Naoki wrote: > > > > > > > > > > > I would agree that testing any of those for '== True' or > > > > the like is pointless redundancy, > > > > > > But what's wrong wit

Re: [Tutor] beginning to code

2017-09-18 Thread Rick Johnson
Steve D'Aprano wrote: > [snip: offensive statements] > > Your insistence on adding the entirely superfluous, unnecessary Please acquaint yourself with the definition of superfluous, as in most i have seen, the actual word "unnecessary" is part of the definition. > and distracting "== True" at th

Re: [Tutor] beginning to code

2017-09-18 Thread Rick Johnson
On Sunday, September 17, 2017 at 8:51:38 PM UTC-5, INADA Naoki wrote: > > > > > > > > I would agree that testing any of those for '== True' or > > > the like is pointless redundancy, > > > > But what's wrong with syntactical redundancy when it brings > > _clarity_ to the source code? And why can't

Re: [Tutor] beginning to code

2017-09-18 Thread Rick Johnson
On Sunday, September 17, 2017 at 7:12:46 PM UTC-5, Terry Reedy wrote: > The coinage 'Executable pseudocode' was my description of Python on > comp.lang.python, mirrored to this list, in April 1997, long before > I became a Python (core) dev. Guido did say things like 'human > readable' before th

Re: Old Man Yells At Cloud

2017-09-18 Thread bartc
On 18/09/2017 04:23, Steve D'Aprano wrote: On Mon, 18 Sep 2017 11:11 am, Rick Johnson wrote: Speaking in _keystrokes_, and that's what really matters here, a print function is always three more keystrokes than a print statement. Keystrokes only matter if you are hunt'n'peck typing and need to

The Python-List community

2017-09-18 Thread Leam Hall
A few days ago I pointed out that this list's community had "opportunities to improve". While we still have lots of those opportunities, it is good to see several community members raise the bar in welcoming new folks into the community. Thank you for your help and positive attitude! Leam --

Re: speech_to_text python command not working

2017-09-18 Thread Paul Moore
With that information, my guess would be that the way the web service reports errors has changed, and the Python library is failing to handle errors nicely for you, but the basic functionality still works. So that's somewhat good news, as you can at least handle anything that *would* work, even if

Re: speech_to_text python command not working

2017-09-18 Thread pizza python
Hi all. I tried the same command with a different, smaller file. This file is a 90-kilobyte ogg file. The other one was a 26-megabyte ogg file. Wtih this smaller file, there was no error. speech_to_text -u myUsername -p myPassword -f html -i audio-file.ogg transcript.html Star

Re: speech_to_text python command not working

2017-09-18 Thread pizza python
On Mon, Sep 18, 2017 at 1:11 AM, Paul wrote: On 18 September 2017 at 09:03, pizza python wrote: > Your error occurs because what the "external service" has delivered > it not what "speech-to-text" has expected. More precisely, > "speech-to-text" has exce

Re: speech_to_text python command not working

2017-09-18 Thread Paul Moore
On 18 September 2017 at 09:03, pizza python wrote: > Your error occurs because what the "external service" has delivered > it not what "speech-to-text" has expected. More precisely, > "speech-to-text" has excepted as result a dict with a "results" key -- > but this is missing (

Re: speech_to_text python command not working

2017-09-18 Thread pizza python
Speech to text conversion is not a pure Python solution. It must be based on some kind of "external service". From the details you have provided, it looks like some web service. Yes, you are right. It's based on IBM Watson's web/cloud service. Your error occurs becaus

Re: speech_to_text python command not working

2017-09-18 Thread dieter
"pizza python" writes: >I'm on Linux Mint 18.2 Cinnamon 64-bit. > >I am trying to get IBM Watson BlueMix Speech-To-Text to transcribe my >spoken-word audio files. Because I'm not a coder, I tried to find the >simplest way to use BlueMix Speech-to-Text. And what I found >is [1]h

Attribute error for NoneType

2017-09-18 Thread kimvais
Hi, A common source of confusion for newbies is the `AttributeError: NoneType has no attribute ...` Also, one of my pet peeves for violating EAFP is the common `if something is not None:` ... Both of these could be "fixed" by having a new exception (that subclasses AttributeError) e.g. `IsNon