Re: [Python-ideas] Hexadecimal floating literals

2017-09-20 Thread Steven D'Aprano
On Thu, Sep 21, 2017 at 11:13:44AM +1000, Nick Coghlan wrote: > I think so, as consider this question: how do you write a script that > accepts a user-supplied string (e.g. from a CSV file) and treats it as > hex floating point if it has the 0x prefix, and decimal floating point > otherwise? floa

Re: [Python-ideas] Hexadecimal floating literals

2017-09-20 Thread Guido van Rossum
Yeah, I agree, +0. It won't confuse anyone who doesn't care about it and those who need it will benefit. On Wed, Sep 20, 2017 at 6:13 PM, Nick Coghlan wrote: > On 21 September 2017 at 10:44, Chris Barker - NOAA Federal > wrote: > [Thibault] > >> To sum up: > >> - In some specific context, hexa

Re: [Python-ideas] A PEP to define basical metric which allows to guarantee minimal code quality

2017-09-20 Thread Nick Coghlan
On 21 September 2017 at 10:51, Ned Batchelder wrote: > Write a document that proposes some quality metrics. Share it around. Get > people to like it. If it becomes popular, then people will start to value it > as a standard for project quality. And explore the academic literature for research on

Re: [Python-ideas] Hexadecimal floating literals

2017-09-20 Thread Nick Coghlan
On 21 September 2017 at 10:44, Chris Barker - NOAA Federal wrote: [Thibault] >> To sum up: >> - In some specific context, hexadecimal floating-point constants make it >> easy for the programmers to reproduce the exact value. Typically, a software >> engineer who is concerned about floating-poin

Re: [Python-ideas] A PEP to define basical metric which allows to guarantee minimal code quality

2017-09-20 Thread Ned Batchelder
On 9/20/17 8:37 PM, Chris Barker - NOAA Federal wrote: You can define metrics. But as to what they mean? Well that is the question. One big problem with metrics is that we tend to measure what we know how to measure -- generally really not the most useful metric... As for some kind of PEP or PE

Re: [Python-ideas] Hexadecimal floating literals

2017-09-20 Thread Chris Barker - NOAA Federal
> And that's one of the reasons why the hexadecimal floating-point > representation exist: I suspect no one here thinks floathex representation is unimportant... > > To sum up: > - In some specific context, hexadecimal floating-point constants make it > easy for the programmers to reproduce t

Re: [Python-ideas] A PEP to define basical metric which allows to guarantee minimal code quality

2017-09-20 Thread Chris Barker - NOAA Federal
> You can define metrics. But as to what they mean? Well that is the question. One big problem with metrics is that we tend to measure what we know how to measure -- generally really not the most useful metric... As for some kind of PEP or PEP-like document: I think we'd have to see a draft befo

Re: [Python-ideas] A PEP to define basical metric which allows to guarantee minimal code quality

2017-09-20 Thread Barry Scott
> On 20 Sep 2017, at 20:02, alexandre.gal...@gmail.com wrote: > > Hi, > > Thanks to everyone for your contribution to my proposal. > > @Barry, I agree with you that each organisation needs to integrate the > "quality process" in their workflow. But before integrate it, this "quality" > proces

Re: [Python-ideas] A PEP to define basical metric which allows to guarantee minimal code quality

2017-09-20 Thread alexandre . galode
Hi, Thanks to everyone for your contribution to my proposal. @Barry, I agree with you that each organisation needs to integrate the "quality process" in their workflow. But before integrate it, this "quality" process need to be define, at minimal, i think. I don't think too this is easy to mea

Re: [Python-ideas] A PEP to define basical metric which allows to guarantee minimal code quality

2017-09-20 Thread Jason H
> > How do we handle different organizational requirements? > > > By keeping linting out of the code ( and certainly out of "official" > python), and in the organization's development process where it > belongs. > > > @pylint([34]) > > @pep([8,20]) > > def f(a): > > return math.sqrt(a) > > Yeac

Re: [Python-ideas] A PEP to define basical metric which allows to guarantee minimal code quality

2017-09-20 Thread Chris Barker - NOAA Federal
> How do we handle different organizational requirements? > By keeping linting out of the code ( and certainly out of "official" python), and in the organization's development process where it belongs. > @pylint([34]) > @pep([8,20]) > def f(a): > return math.sqrt(a) Yeach! But that's just my op

Re: [Python-ideas] A PEP to define basical metric which allows to guarantee minimal code quality

2017-09-20 Thread Jason H
> Quality is something that an organisation and its people need to achieve by > building appropriate processes and improvement methods into their work flow. > Trying to be prescriptive will run into trouble for the wider world I suspect. > > Many of the maintainability metrics may help a team. >

Re: [Python-ideas] Hexadecimal floating literals

2017-09-20 Thread Thibault Hilaire
Hi everyone >> Of course, for a lost of numbers, the decimal representation is simpler, and >> just as accurate as the radix-2 hexadecimal representation. >> But, due to the radix-10 and radix-2 used in the two representations, the >> radix-2 may be much easier to use. > > Hex is radix 16, not