Re: [Python-ideas] Where should grouping() live (was: grouping / dict of lists)

2018-07-09 Thread Franklin? Lee
(Fixing quote and attribution.) On Fri, Jul 6, 2018, 11:32 Chris Barker - NOAA Federal via Python-ideas wrote: > > On Jul 6, 2018, at 2:10 AM, Steven D'Aprano wrote: > > > On Fri, Jul 06, 2018 at 09:49:37AM +0100, Cammil Taank wrote: > > > I would consider statistics > > > > to have

Re: [Python-ideas] Fwd: grouping / dict of lists

2018-07-09 Thread Franklin? Lee
On Mon, Jul 9, 2018 at 12:22 PM, Chris Barker wrote: > On Fri, Jul 6, 2018 at 12:26 PM, Franklin? Lee I use this kind of function >> I added several options, such as: >> - key function >> - value function >> - "ignore": Skip values with these keys. >> - "postprocess": Apply a function to each

Re: [Python-ideas] Add new `Symbol` type

2018-07-09 Thread Eric V. Smith
On 7/9/2018 5:01 PM, Brett Cannon wrote: On Fri, 6 Jul 2018 at 09:24 Eric V. Smith > wrote: On 7/6/2018 11:20 AM, Flavio Curella wrote: > I think this thread can be resolved as 'used unittest.mock.sentinel'. It > doesn't have 'global sentinels',

Re: [Python-ideas] Add new `Symbol` type

2018-07-09 Thread Brett Cannon
On Fri, 6 Jul 2018 at 09:24 Eric V. Smith wrote: > On 7/6/2018 11:20 AM, Flavio Curella wrote: > > I think this thread can be resolved as 'used unittest.mock.sentinel'. It > > doesn't have 'global sentinels', but I'm not convinced they are actually > > necessary, since `mock.sentinel` objects

Re: [Python-ideas] Fwd: grouping / dict of lists

2018-07-09 Thread David Mertz
In my mind, I *rarely* (which is more than never) have my data in the form of a sequence of key/value pairs. The version of the API that assumes data starts that way feels like either a niche case, or demands preprocessing before it's ready to pass to grouping() or collections.Grouping(). That

Re: [Python-ideas] Calling python from C completely statically

2018-07-09 Thread Alberto Garcia
Hi, thank you for your response. I've downloaded the sources but I couldn't find any documentation. In addition I see that there is not a single C/C++ file. What I want to do is calling python from C. Am I missing something? Cheers On Mon, Jul 9, 2018 at 12:20 PM Barry Scott wrote: > I think

Re: [Python-ideas] Calling python from C completely statically

2018-07-09 Thread Barry Scott
I think you might find Gordon McMillian's installer interesting to look at. It has a lot f the tech that I think you are looking for. Works up to python 2.7. I ended up taking over when Gordon stopped maintaining it and kept it going up to python 2.7. In principle the same ideas could be made

Re: [Python-ideas] Calling python from C completely statically

2018-07-09 Thread Alberto Garcia
Does the zip need to reside in disk to be loaded. Or can it be loaded from memory? I don't want it to be loaded from disk but from Memory On Mon, Jul 9, 2018 at 9:59 AM Alberto Garcia wrote: > O I guess you mean this: > >

Re: [Python-ideas] Calling python from C completely statically

2018-07-09 Thread Alberto Garcia
O I guess you mean this: https://github.com/anthony-tuininga/cx_Freeze/blob/master/source/bases/Common.c Right? On Mon, Jul 9, 2018 at 9:48 AM Alberto Garcia wrote: > Thank you for your response, > > I was thinking on creating that zip file with the content of the Lib > folder and

Re: [Python-ideas] Calling python from C completely statically

2018-07-09 Thread Alberto Garcia
Thank you for your response, I was thinking on creating that zip file with the content of the Lib folder and having my c code to download it over the network and have it in memory. I guess that the zip file should have no compression at all right? When you say that I need to use the cx_freeze

Re: [Python-ideas] Fwd: grouping / dict of lists

2018-07-09 Thread Chris Barker via Python-ideas
On Fri, Jul 6, 2018 at 12:26 PM, Franklin? Lee I use this kind of function in several different projects over the > > years, and I rewrote it many times as needed. > > I added several options, such as: > - key function > - value function > - "ignore": Skip values with these keys. > -

Re: [Python-ideas] The future of Python parallelism. The GIL. Subinterpreters. Actors.

2018-07-09 Thread Trent Nelson
On Sun, Jul 08, 2018 at 11:27:08AM -0700, David Foster wrote: > I'd like to solicit some feedback on what might be the most > efficient way to make forward progress on efficient parallelization > in Python inside the same OS process. The most promising areas > appear to be: You might find

Re: [Python-ideas] Where should grouping() live

2018-07-09 Thread Chris Barker via Python-ideas
On Fri, Jul 6, 2018 at 5:13 PM, Michael Selik wrote: > On Tue, Jul 3, 2018 at 10:11 PM Chris Barker via Python-ideas < > python-ideas@python.org> wrote: > >> * There are types of data well suited to the key function approach, and >> other data not so well suited to it. If you want to support the

Re: [Python-ideas] The future of Python parallelism. The GIL. Subinterpreters. Actors.

2018-07-09 Thread Nick Coghlan
On 9 July 2018 at 04:27, David Foster wrote: > I'd like to solicit some feedback on what might be the most efficient way to > make forward progress on efficient parallelization in Python inside the same > OS process. The most promising areas appear to be: > > 1. Make the current subinterpreter

Re: [Python-ideas] Calling python from C completely statically

2018-07-09 Thread Nick Coghlan
On 9 July 2018 at 03:10, Alberto Garcia wrote: > Hey there, > > Yes, the part of having the pyd modules built in in library is already done. > I followed the instructions in the README. What I would like to know now is > how to embed the non frozen python (py) modules. Can you guys please point >