Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-17 Thread Nathaniel Smith
On Sat, Mar 17, 2018 at 10:15 AM, Stephen J. Turnbull wrote: > (5) perform operations on several objects denoted by Paths at once > (copy and its multiple operand variants), Sure it does: Path.rename and Path.replace. I know why rename and copy have

Re: [Python-ideas] Adding quantile to the statistics module

2018-03-17 Thread Tim Peters
[Guido] > Since Python is not held to backwards compatibility with S, and for most > datasets (and users) it doesn't matter much, why not ho with the default > recommended by Hyndman & Fan? BTW, I should clarify that I agree! H didn't invent "method 8", or any of the other methods their paper

Re: [Python-ideas] Syntax idea for 2D lists\arrays

2018-03-17 Thread Steven D'Aprano
On Sun, Mar 18, 2018 at 02:04:43AM +0100, Mikhail V wrote: > So with the TAB separator, just think of replacement TAB->comma, > this should support all Python expressions automatically. > At least seems to me so, but if I am delusional - please correct me. It is still ambiguous: py>

Re: [Python-ideas] Syntax idea for 2D lists\arrays

2018-03-17 Thread Mikhail V
On Thu, Mar 15, 2018 at 6:15 AM, Steven D'Aprano wrote: > On Thu, Mar 15, 2018 at 01:32:35AM +0100, Mikhail V wrote: > > > Using spaces to separate items has the fatal flaw that it cannot > distinguish > > x - y 0 # two items, the expression `x - y` and the integer 0 >

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations -- version 2

2018-03-17 Thread George Fischhof
2018. márc. 17. 21:34 ezt írta ("Barry" ): On 17 Mar 2018, at 10:42, George Fischhof wrote: Hi folks, I added the list of functions to the proposal, here is the new version. George PEP: Title: Pathlib Module Should Contain All File

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations -- version 2

2018-03-17 Thread Barry
> On 17 Mar 2018, at 10:42, George Fischhof wrote: > > Hi folks, > > I added the list of functions to the proposal, here is the new version. > > George > > > > > PEP: > Title: Pathlib Module Should Contain All File Operations > Author: George Fischhof > Status:

Re: [Python-ideas] Adding quantile to the statistics module

2018-03-17 Thread Mahmoud Hashemi
Hahaha, that Hyndman story will never get old. FWIW, based on much informal polling, the most common intuition on the topic stems from elementary education: a median of an even-numbered set is the mean of the two central values. So, linear-weighted average on discontinuities seems to be least

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-17 Thread Stephen J. Turnbull
George Fischhof writes: > It seems that the original idea was something like for my idea. > Just it not finished yet, Antoine (author and maintainer of pathlib) is not the kind of developer who leaves things unfinished. In PEP 428, there's a hint that some shutil functionality could be added,

Re: [Python-ideas] Adding quantile to the statistics module

2018-03-17 Thread Tim Peters
[Guido] > Since Python is not held to backwards compatibility with S, and for most > datasets (and users) it doesn't matter much, why not ho with the default > recommended by Hyndman & Fan? Here's Hyndman in 2016[1]: """ The main point of our paper was that statistical software should

Re: [Python-ideas] PEP 572 version 2: Statement-Local Name Bindings

2018-03-17 Thread David Foster
I mean approximately local to one line of source code. Perhaps the unpopular opinion based on your reaction. :) More specifically, for a simple statement (with no trailing colon), there is one scope enclosing everything in the statement. For a compound statement, composed of multiple clauses,

Re: [Python-ideas] Adding quantile to the statistics module

2018-03-17 Thread Guido van Rossum
Since Python is not held to backwards compatibility with S, and for most datasets (and users) it doesn't matter much, why not ho with the default recommended by Hyndman & Fan? On Fri, Mar 16, 2018 at 11:48 PM, Nathaniel Smith wrote: > On Fri, Mar 16, 2018 at 11:19 PM, Stephen J.

[Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations -- version 2

2018-03-17 Thread George Fischhof
Hi folks, I added the list of functions to the proposal, here is the new version. George PEP: Title: Pathlib Module Should Contain All File Operations Author: George Fischhof Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 15-Mar-2018 Python-Version: 3.8

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-17 Thread George Fischhof
2018-03-17 7:18 GMT+01:00 Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp>: > Joonas Liik writes: > > > then it might be an acceptable compromise to have yet another... > > "There should be one-- and preferably only one -- obvious way to do it." > > The obvious way is to use the

Re: [Python-ideas] PEP 572 version 2: Statement-Local Name Bindings

2018-03-17 Thread Chris Angelico
On Sat, Mar 17, 2018 at 5:49 PM, David Foster wrote: > (3a) With a header-limited scope (in proposal #1 above), I advocate that a > named expression should NOT be able to shadow other variables, giving a > SyntaxError. I can't think of a reasonable reason why such shadowing

Re: [Python-ideas] PEP 572 version 2: Statement-Local Name Bindings

2018-03-17 Thread David Foster
(1) I am concerned with the proposal's ability to introduce variables with a new broader kind of multi-line scope not seen anywhere else in Python. It is difficult to reason about, particularly in constructs like lambdas and inline def functions. Limiting scope to the very same line is great: >

Re: [Python-ideas] Adding quantile to the statistics module

2018-03-17 Thread Nathaniel Smith
On Fri, Mar 16, 2018 at 11:19 PM, Stephen J. Turnbull wrote: > PLIQUE Guillaume writes: > > > That's really interesting. I did not know there were so many way to > > consider quantiles. Maybe we should indeed wait for numpy to take a > > decision on the

Re: [Python-ideas] Adding quantile to the statistics module

2018-03-17 Thread Stephen J. Turnbull
PLIQUE Guillaume writes: > That's really interesting. I did not know there were so many way to > consider quantiles. Maybe we should indeed wait for numpy to take a > decision on the matter and go with their default choice so we remain > consistent with the ecosystem? The example of R with 9

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-17 Thread Stephen J. Turnbull
Joonas Liik writes: > then it might be an acceptable compromise to have yet another... "There should be one-- and preferably only one -- obvious way to do it." The obvious way is to use the existing stdlib modules. So > package that just imports os, pathlib, shutil etc and re-exports >