[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread Jonathan Goble
On Sat, Nov 2, 2019 at 9:52 PM MRAB wrote: > > On 2019-11-03 00:38, Chris Angelico wrote: > > On Sun, Nov 3, 2019 at 11:34 AM Eric V. Smith wrote: > >> > >> On 11/2/2019 7:24 PM, Steven D'Aprano wrote: > >> > I see no reason why this shouldn't be allowed. It seems like a > >> > straight-forward f

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread MRAB
On 2019-11-03 00:38, Chris Angelico wrote: On Sun, Nov 3, 2019 at 11:34 AM Eric V. Smith wrote: On 11/2/2019 7:24 PM, Steven D'Aprano wrote: > I see no reason why this shouldn't be allowed. It seems like a > straight-forward feature request, and one that is compatible with the > basic idea tha

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread Chris Angelico
On Sun, Nov 3, 2019 at 11:34 AM Eric V. Smith wrote: > > On 11/2/2019 7:24 PM, Steven D'Aprano wrote: > > I see no reason why this shouldn't be allowed. It seems like a > > straight-forward feature request, and one that is compatible with the > > basic idea that Path objects should be usable anywh

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread Eric V. Smith
On 11/2/2019 7:24 PM, Steven D'Aprano wrote: I see no reason why this shouldn't be allowed. It seems like a straight-forward feature request, and one that is compatible with the basic idea that Path objects should be usable anywhere you need a file name. The problem is that in the given example

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread Steven D'Aprano
I see no reason why this shouldn't be allowed. It seems like a straight-forward feature request, and one that is compatible with the basic idea that Path objects should be usable anywhere you need a file name. You should just add an enhancement request on the bug tracker (but check to see if t

[Python-ideas] Allow Path object instances in subprocess.Popen

2019-11-02 Thread brunoais
Recurrently, files are referenced when calling subprocesses. Just recently, I wanted to execute a C program to efficiently process an image and, what I had in my program, was a Path. This idea would allow turning this (imports ommitted): `Popen(('/path/to/program', '-o', fspath(outputPath), fspat

[Python-ideas] Re: foo.setParseAction(lambda a, b, c: raise FuckPython(":("))

2019-11-02 Thread Random832
On Sun, Oct 27, 2019, at 19:17, Andrew Barnert via Python-ideas wrote: > On Oct 27, 2019, at 15:07, Ben Rudiak-Gould wrote: > > > > throw is an expression, not a statement, in C++. I see no reason raise > > couldn't be an expression in Python. It doesn't even need a special > > rule in the gramma

[Python-ideas] Re: Python 4000: Have stringlike objects provide sequence views rather than being sequences

2019-11-02 Thread Random832
On Sun, Oct 27, 2019, at 03:10, Andrew Barnert wrote: > On Oct 26, 2019, at 19:59, Random832 wrote: > > > > A string representation considering of (say) a UTF-8 string, plus an > > auxiliary list of byte indices of, say, 256-codepoint-long chunks [along > > with perhaps a flag to say that the c