Re: [Python-Dev] PEP 485 review (isclose())

2015-03-05 Thread Victor Stinner
2015-03-03 10:17 GMT+01:00 Victor Stinner : > Maybe it's time to rename the math module to _math and create a > math.py module, like _decimal/decimal? math.py should end with "from > _math import *". Since the idea looks to be well accepted, I proposed a patch to implement it: http://bugs.python.o

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-04 Thread Chris Barker
On Wed, Mar 4, 2015 at 12:33 PM, Guido van Rossum wrote: > In this case I disagree. The math module mostly wraps the C math library > and the bar should remain high for things to be added to it. Let this be > someone's opportunity to learn C (I guess not Chris's :-). > As it happens, the first C

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-04 Thread Guido van Rossum
In this case I disagree. The math module mostly wraps the C math library and the bar should remain high for things to be added to it. Let this be someone's opportunity to learn C (I guess not Chris's :-). On Wed, Mar 4, 2015 at 12:23 PM, Brett Cannon wrote: > > > On Wed, Mar 4, 2015 at 3:14 PM C

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-04 Thread Guido van Rossum
No. On Wed, Mar 4, 2015 at 12:12 PM, Chris Barker wrote: > On Tue, Mar 3, 2015 at 8:43 AM, Ethan Furman wrote: > >> On 03/03/2015 01:17 AM, Victor Stinner wrote: >> > > >> > Maybe it's time to rename the math module to _math and create a >> > math.py module, like _decimal/decimal? math.py shoul

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-04 Thread Brett Cannon
On Wed, Mar 4, 2015 at 3:14 PM Chris Barker wrote: > On Tue, Mar 3, 2015 at 8:43 AM, Ethan Furman wrote: > >> On 03/03/2015 01:17 AM, Victor Stinner wrote: >> > > >> > Maybe it's time to rename the math module to _math and create a >> > math.py module, like _decimal/decimal? math.py should end w

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-04 Thread Chris Barker
On Tue, Mar 3, 2015 at 8:43 AM, Ethan Furman wrote: > On 03/03/2015 01:17 AM, Victor Stinner wrote: > > > Maybe it's time to rename the math module to _math and create a > > math.py module, like _decimal/decimal? math.py should end with "from > > _math import *". > > +1 > What do folks think?

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-03 Thread Ethan Furman
On 03/03/2015 01:17 AM, Victor Stinner wrote: > 2015-03-03 6:25 GMT+01:00 Chris Barker : >> >> As far as I can tell, the math module is entirely a C extension. So I can: >> 2) Write it in Python, and monkey-patch it in to the math module -- I >> honestly have no idea how to do that, but as I can a

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-03 Thread Guido van Rossum
On Mon, Mar 2, 2015 at 10:48 PM, Chris Barker wrote: > On Mon, Mar 2, 2015 at 10:39 PM, Guido van Rossum > wrote: > > (*) Adding it to the decimal module would require a discussion with >> Raymond Hettinger, but Decimal users can probably copy and paste the >> formula from the PEP. >> > > yup --

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-03 Thread Victor Stinner
2015-03-03 6:25 GMT+01:00 Chris Barker : > As far as I can tell, the math module is entirely a C extension. So I can: > (...) > 2) Write it in Python, and monkey-patch it in to the math module -- I > honestly have no idea how to do that, but as I can add a new name to the > math module after import

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-02 Thread Chris Barker
On Mon, Mar 2, 2015 at 10:39 PM, Guido van Rossum wrote: > It should be written in C. I thought you knew. :-) > It crossed my mind when we talked about the math module -- but I didn't really think about it... I guess it's okay to drop Decimal support (*). Complex support probably > should be in

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-02 Thread Guido van Rossum
It should be written in C. I thought you knew. :-) I guess it's okay to drop Decimal support (*). Complex support probably should be in cmath. But this is an amendmend to the PEP as accepted. If anyone cares about these changes they should speak up, otherwise the PEP should be updated. (*) Addin

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-02 Thread Chris Barker
On Fri, Feb 27, 2015 at 12:07 PM, Chris Barker wrote: > I'll edit the text as you suggest, > Done. > and then work on a patch -- I'm sure I'll have questions for Python-dev > when I actually do that, but I'll get started on my own and see how far I > get. > OK -- big question 1: As far as

Re: [Python-Dev] PEP 485 review (isclose())

2015-02-28 Thread Nick Coghlan
On 28 Feb 2015 06:16, "Chris Barker" wrote: > > Thank you Guido. > > It'll be nice to see this all come to something. > > Thanks to all who contributed to the discussion -- despite this being a pretty simple function, I learned a lot and far more fully appreciate the nuance of all of this. The si

Re: [Python-Dev] PEP 485 review (isclose())

2015-02-27 Thread Gary Herron
On 02/27/2015 12:07 PM, Chris Barker wrote: Thank you Guido. It'll be nice to see this all come to something. Thanks to all who contributed to the discussion -- despite this being a pretty simple function, I learned a lot and far more fully appreciate the nuance of all of this. I'll edit th

Re: [Python-Dev] PEP 485 review (isclose())

2015-02-27 Thread Chris Barker
Thank you Guido. It'll be nice to see this all come to something. Thanks to all who contributed to the discussion -- despite this being a pretty simple function, I learned a lot and far more fully appreciate the nuance of all of this. I'll edit the text as you suggest, and then work on a patch -

[Python-Dev] PEP 485 review (isclose())

2015-02-27 Thread Guido van Rossum
I think it's time to accept PEP 485. I've re-read it once more, and it looks like the text is in great shape. (My only recommendation would be to update the Abstract to state that we're specifically adding math.isclose().) A wording question: "This implementation has a flag that lets the user sele