Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Stephen J. Turnbull
Chris Angelico writes: > On Wed, Oct 10, 2018 at 5:09 AM Stephen J. Turnbull > wrote: > > > > Chris Angelico writes: > > > > > Both processes are using the virtual memory. Either or both could be > > > using physical memory. Assuming they haven't written to the pages > > > (which is

Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Cameron Simpson
On 10Oct2018 00:42, Stephen J. Turnbull wrote: Chris Angelico writes: > On Tue, Oct 9, 2018 at 10:05 PM Greg Ewing wrote: > > Chris Angelico wrote: > > > In contrast, a mmap'd file is memory that you do indeed own. > > > > Although it's not really accurate to say that it's owned by > > a

Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Greg Ewing
Stephen J. Turnbull wrote: Subject to COW, I presume. Probably in units smaller than the whole file (per page?) It can be COW or not, depending on the options passed to mmap. And yes, it's mapped in units of pages. -- Greg ___ Python-ideas mailing

Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Chris Angelico
On Wed, Oct 10, 2018 at 5:09 AM Stephen J. Turnbull wrote: > > Chris Angelico writes: > > > Both processes are using the virtual memory. Either or both could be > > using physical memory. Assuming they haven't written to the pages > > (which is the case with executables - the system mmaps the

Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Stephen J. Turnbull
Chris Angelico writes: > Both processes are using the virtual memory. Either or both could be > using physical memory. Assuming they haven't written to the pages > (which is the case with executables - the system mmaps the binary into > your memory space as read-only), and assuming that those

Re: [Python-ideas] support toml for pyproject support

2018-10-09 Thread Antoine Pitrou
On Mon, 8 Oct 2018 09:26:12 -0400 David Mertz wrote: > I agree here. I briefly urged against using the less used TOML format, but > I have no real skin in the game around packaging. I like YAML, but that's > also not in the standard library, even if more widely used. Agreed with David. Also,

Re: [Python-ideas] support toml for pyproject support

2018-10-09 Thread Chris Barker - NOAA Federal via Python-ideas
If I had the energy to argue it I would also argue against using TOML > in those PEPs. I partook in that discussion, and I still have no idea why TOML was chosen, over, say, a defined subset of YAML, or a slightly extended JSON. But the folks that were highly invested and putting the work in

Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Chris Angelico
On Wed, Oct 10, 2018 at 2:42 AM Stephen J. Turnbull wrote: > > Chris Angelico writes: > > On Tue, Oct 9, 2018 at 10:05 PM Greg Ewing > wrote: > > > > > > Chris Angelico wrote: > > > > In contrast, a mmap'd file is memory that you do indeed own. > > > > > > Although it's not really

Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Stephen J. Turnbull
Chris Angelico writes: > On Tue, Oct 9, 2018 at 10:05 PM Greg Ewing > wrote: > > > > Chris Angelico wrote: > > > In contrast, a mmap'd file is memory that you do indeed own. > > > > Although it's not really accurate to say that it's owned by > > a particular process. If two processes

Re: [Python-ideas] Introduce typing.SupportsFsPath

2018-10-09 Thread Eric Fahlgren
On Tue, Oct 9, 2018 at 3:16 AM Ivan Levkivskyi wrote: > class PathLike(Protocol[AnyStr]): > I had been working on this same problem intermittently for several months, so thanks, but... error: Invariant type variable 'AnyStr' used in protocol where covariant one is expected is called out

Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Chris Angelico
On Tue, Oct 9, 2018 at 10:05 PM Greg Ewing wrote: > > Chris Angelico wrote: > > In contrast, a mmap'd file is memory that you do indeed own. > > Although it's not really accurate to say that it's owned by > a particular process. If two processes mmap the same file, > the physical memory pages

Re: [Python-ideas] Support parsing stream with `re`

2018-10-09 Thread Greg Ewing
Chris Angelico wrote: In contrast, a mmap'd file is memory that you do indeed own. Although it's not really accurate to say that it's owned by a particular process. If two processes mmap the same file, the physical memory pages holding it appear in the address spaces of both processes. --

Re: [Python-ideas] Introduce typing.SupportsFsPath

2018-10-09 Thread Ivan Levkivskyi
On Tue, 9 Oct 2018 at 03:13, Guido van Rossum wrote: > In typeshed there is os.PathLike which is close. You should be able to use > Union[str, os.PathLike[str]] for what you want (or define an alias). > > We generally don't want to add more things to typing that aren't closely > related to the

Re: [Python-ideas] Why is design-by-contracts not widely adopted?

2018-10-09 Thread Steven D'Aprano
On Mon, Oct 08, 2018 at 03:34:51PM -0400, Terry Reedy wrote: > >> I said above that functions may be specified by > >> process rather than result. > > > > Fine. What of it? Can you describe what the function does? > > > > "It sorts the list in place." > > > > "It deletes the given record from the