Re: [Python-Dev] Pre-PEP: Redesigning extension modules

2013-09-08 Thread Stefan Behnel
Eric Snow, 08.09.2013 00:22: On Mon, Sep 2, 2013 at 7:02 AM, Nick Coghlan wrote: The hook API I currently have in mind is a two step initialisation: PyImport_PrepareNAME (optional) PyImport_ExecNAME Should we also look at an API change for the initfunc() of PyImport_Inittab

[Python-Dev] metaclasses, classes, instances, and proper nomenclature

2013-09-08 Thread Ethan Furman
I've run across two different ways to think about this: 1) the type of the first argument 2) where the method/attribute lives Since attributes don't take a first argument they default to 2: an instance attribute lives in the instance, a class attribute lives in the class, and a metaclass

Re: [Python-Dev] metaclasses, classes, instances, and proper nomenclature

2013-09-08 Thread Nick Coghlan
On 8 Sep 2013 18:38, Ethan Furman et...@stoneleaf.us wrote: I've run across two different ways to think about this: 1) the type of the first argument 2) where the method/attribute lives Since attributes don't take a first argument they default to 2: an instance attribute lives in the

Re: [Python-Dev] cpython: Issue #18904: test_socket: add inheritance tests using fcntl and FD_CLOEXEC

2013-09-08 Thread Antoine Pitrou
On Sun, 8 Sep 2013 11:54:00 +0200 (CEST) victor.stinner python-check...@python.org wrote: http://hg.python.org/cpython/rev/b7f6f6f59e91 changeset: 85619:b7f6f6f59e91 user:Victor Stinner victor.stin...@gmail.com date:Sun Sep 08 11:53:09 2013 +0200 summary: Issue #18904:

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Steven D'Aprano
bump I'd like to get some attention for this please. On Sat, Aug 31, 2013 at 12:58:39PM +1000, Steven D'Aprano wrote: Hi all, I think that PEP 450 is now ready for a PEP dictator. There have been a number of code reviews, and feedback has been taken into account. The test suite

Re: [Python-Dev] cpython: Issue #18904: test_socket: add inheritance tests using fcntl and FD_CLOEXEC

2013-09-08 Thread Victor Stinner
2013/9/8 Antoine Pitrou solip...@pitrou.net: On Sun, 8 Sep 2013 11:54:00 +0200 (CEST) victor.stinner python-check...@python.org wrote: http://hg.python.org/cpython/rev/b7f6f6f59e91 changeset: 85619:b7f6f6f59e91 user:Victor Stinner victor.stin...@gmail.com date:Sun Sep 08

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Ryan
...what's a PEP dictator? Steven D'Aprano st...@pearwood.info wrote: bump I'd like to get some attention for this please. On Sat, Aug 31, 2013 at 12:58:39PM +1000, Steven D'Aprano wrote: Hi all, I think that PEP 450 is now ready for a PEP dictator. There have been a number of code

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Antoine Pitrou
On Sat, 31 Aug 2013 12:58:39 +1000 Steven D'Aprano st...@pearwood.info wrote: Hi all, I think that PEP 450 is now ready for a PEP dictator. Perhaps Mark would like to apply? Regards Antoine. ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Ethan Furman
On 09/08/2013 06:52 AM, Ryan wrote: ...what's a PEP dictator? The person tasked with deciding on the fate of an individual PEP. -- ~Ethan~ ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Guido van Rossum
Going over the open issues: - Parallel arrays or arrays of tuples? I think the API should require an array of tuples. It is trivial to zip up parallel arrays to the required format, while if you have an array of tuples, extracting the parallel arrays is slightly more cumbersome. Also for

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Guido van Rossum
Steven, I'd like to just approve the PEP, given the amount of discussion that's happened already (though I didn't follow much of it). I quickly glanced through the PEP and didn't find anything I'd personally object to, but then I found your section of open issues, and I realized that you don't

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Alexander Belopolsky
On Sun, Sep 8, 2013 at 9:32 PM, Guido van Rossum gu...@python.org wrote: - Parallel arrays or arrays of tuples? I think the API should require an array of tuples. It is trivial to zip up parallel arrays to the required format, while if you have an array of tuples, extracting the parallel

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Guido van Rossum
Never mind, I found the patch and the issue. I really think that the *PEP* is ready for inclusion after the open issues are changed into something like Discussion or Future Work, and after adding a more prominent link to the issue with the patch. Then the *patch* can be reviewed some more until it

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Guido van Rossum
Well, to me zip(*x) is unnatural, and it's inefficient when the arrays are long. On Sun, Sep 8, 2013 at 10:45 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Sun, Sep 8, 2013 at 9:32 PM, Guido van Rossum gu...@python.org wrote: - Parallel arrays or arrays of tuples? I think

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Steven D'Aprano
On Sun, Sep 08, 2013 at 10:25:22AM -0700, Guido van Rossum wrote: Steven, I'd like to just approve the PEP, given the amount of discussion that's happened already (though I didn't follow much of it). I quickly glanced through the PEP and didn't find anything I'd personally object to, but then

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Paul Moore
On 8 September 2013 20:19, Steven D'Aprano st...@pearwood.info wrote: [...] Is this satisfactory or do I need to go into more detail? It describes only 7 functions, and yet you state there are 11. I'd suggest you add a 1-line summary of each function, something like: mean - calculate the

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Oscar Benjamin
On 8 September 2013 18:32, Guido van Rossum gu...@python.org wrote: Going over the open issues: - Parallel arrays or arrays of tuples? I think the API should require an array of tuples. It is trivial to zip up parallel arrays to the required format, while if you have an array of tuples,

Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-08 Thread Janzert
It seems like most of this could live on PyPi for a while so the API can get hashed out in use? If that's not the case is it because the PEP 445 API isn't rich enough? Janzert ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Guido van Rossum
On Sun, Sep 8, 2013 at 1:48 PM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 8 September 2013 18:32, Guido van Rossum gu...@python.org wrote: Going over the open issues: - Parallel arrays or arrays of tuples? I think the API should require an array of tuples. It is trivial to zip up

Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-08 Thread Victor Stinner
2013/9/8 Janzert janz...@janzert.com: It seems like most of this could live on PyPi for a while so the API can get hashed out in use? The pytracemalloc is available on PyPI since 6 months. The only feedback I had was something trying to compile it on Windows (which is complex because of the

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Steven D'Aprano
On Sun, Sep 08, 2013 at 02:41:35PM -0700, Guido van Rossum wrote: On Sun, Sep 8, 2013 at 1:48 PM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: The most obvious alternative that isn't explicitly mentioned in the PEP is to accept either: def correlation(x, y=None): if y is None:

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Stephen J. Turnbull
Guido van Rossum writes: On Sun, Sep 8, 2013 at 1:48 PM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 8 September 2013 18:32, Guido van Rossum gu...@python.org wrote: Going over the open issues: - Parallel arrays or arrays of tuples? I think the API should require an

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Greg
On 9/09/2013 5:52 a.m., Guido van Rossum wrote: Well, to me zip(*x) is unnatural, and it's inefficient when the arrays are long. Would it be worth having a transpose() function in the stdlib somewhere, that returns a view instead of copying the data? -- Greg

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Guido van Rossum
Yeah, so this and Steven's review of various other APIs suggests that the field of statistics hasn't really reached the object-oriented age (or perhaps the OO view isn't suitable for the field), and people really think of their data as a matrix of some sort. We should respect that. Now, if this

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Guido van Rossum
On Sun, Sep 8, 2013 at 5:26 PM, Greg greg.ew...@canterbury.ac.nz wrote: On 9/09/2013 5:52 a.m., Guido van Rossum wrote: Well, to me zip(*x) is unnatural, and it's inefficient when the arrays are long. Would it be worth having a transpose() function in the stdlib somewhere, that returns a

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Steven D'Aprano
On Sun, Sep 08, 2013 at 09:14:39PM +0100, Paul Moore wrote: On 8 September 2013 20:19, Steven D'Aprano st...@pearwood.info wrote: [...] Is this satisfactory or do I need to go into more detail? It describes only 7 functions, and yet you state there are 11. I'd suggest you add a 1-line

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-08 Thread Steven D'Aprano
On Mon, Sep 09, 2013 at 12:26:05PM +1200, Greg wrote: On 9/09/2013 5:52 a.m., Guido van Rossum wrote: Well, to me zip(*x) is unnatural, and it's inefficient when the arrays are long. Would it be worth having a transpose() function in the stdlib somewhere, that returns a view instead of