[Python-ideas] Re: PEP 472 -- Support for indexing with keyword arguments

2020-07-18 Thread Steven D'Aprano
On Sat, Jul 18, 2020 at 12:18:38AM -0400, Ricky Teachey wrote: > On Fri, Jul 17, 2020 at 7:21 PM Steven D'Aprano wrote: > > > On Fri, Jul 17, 2020 at 11:11:17AM -0400, Ricky Teachey wrote: > > > > ... > > > > For backwards-compatibility, there will only ever be a single positional > > argument pa

[Python-ideas] Re: PEP 472 -- Support for indexing with keyword arguments

2020-07-18 Thread Jonathan Fine
Andras Tantos wrote > > Thanks for picking up on this thread, I almost given up hope that > anyone would be interested. Then it suddenly blew up :)! to thank all who expressed interest and support. (Andras means 'blew up' in a good way!) And I thank you, Andras. It's nice to be appreciated. I now

[Python-ideas] Re: Access (ordered) dict by index; insert slice

2020-07-18 Thread Rob Cliffe via Python-ideas
On 13/07/2020 18:42, Barry Scott wrote: On 13 Jul 2020, at 05:55, Christopher Barker > wrote: well, sure, though I have to say that I think that that's an unfortunate confusing thing about python dicts. IN fact, I doubt there are many uses at all for dict.keys(

[Python-ideas] Re: PEP 472 -- Support for indexing with keyword arguments

2020-07-18 Thread MRAB
On 2020-07-18 10:04, Steven D'Aprano wrote: On Sat, Jul 18, 2020 at 12:18:38AM -0400, Ricky Teachey wrote: On Fri, Jul 17, 2020 at 7:21 PM Steven D'Aprano wrote: > On Fri, Jul 17, 2020 at 11:11:17AM -0400, Ricky Teachey wrote: > > ... > > For backwards-compatibility, there will only ever be a

[Python-ideas] Re: Pickle security improvements

2020-07-18 Thread Stephen J. Turnbull
Random832 writes: > On Thu, Jul 16, 2020, at 02:36, Stephen J. Turnbull wrote: > > Random832 writes: > > > > > I was asking for the current Unpickler class, which currently has a > > > whitelist hook for loading globals, > > > > Callables are globals in this sense. > > not all calla

[Python-ideas] Re: PEP 472 -- Support for indexing with keyword arguments

2020-07-18 Thread Steven D'Aprano
On Sat, Jul 18, 2020 at 05:30:40PM +0100, MRAB wrote: > I haven't followed this thread for a while, but, to me, it seems that > the simplest option would be to pass the keyword arguments as a dict: What are you going to do with that keyword argument dict? Most use-cases I can think of will have

[Python-ideas] Re: PEP 472 -- Support for indexing with keyword arguments

2020-07-18 Thread Guido van Rossum
Yes please. FWIW, IIRC the “bundle values in a single parameter” predates the demise of __getslice__. It probably was meant for dict keys primarily (no surprise there). The bundling would have been easier for the C API — __getitem__ is as old as Python there. On Sat, Jul 18, 2020 at 10:49 Steven

[Python-ideas] Re: Bringing the print statement back

2020-07-18 Thread Stefano Borini
-1 because it will introduce potential ambiguities and will generate stylistic battles between developers. It will also add questions when teaching python, having to explain the potentially different syntax one might find around. On Wed, 10 Jun 2020 at 01:07, Guido van Rossum wrote: > > In Pytho

[Python-ideas] Re: Pickle security improvements

2020-07-18 Thread Random832
On Sat, Jul 18, 2020, at 12:54, Stephen J. Turnbull wrote: > > I think I got all of them, but if you think there may be others > > feel free to be an extra pair of eyes. But these overrides are not > > available for the C version, > > That's going to be a sticking point, as many pickle use case

[Python-ideas] Re: PEP 472 -- Support for indexing with keyword arguments

2020-07-18 Thread Christopher Barker
On Sat, Jul 18, 2020 at 1:43 PM Guido van Rossum wrote: > Yes please. > Yes to what, exactly? -CHB FWIW, IIRC the “bundle values in a single parameter” predates the demise of > __getslice__. It probably was meant for dict keys primarily (no surprise > there). The bundling would have been easie

[Python-ideas] Re: PEP 472 -- Support for indexing with keyword arguments

2020-07-18 Thread Guido van Rossum
On Sat, Jul 18, 2020 at 9:11 PM Christopher Barker wrote: > > > On Sat, Jul 18, 2020 at 1:43 PM Guido van Rossum wrote: > >> Yes please. >> > > Yes to what, exactly? > > -CHB > > FWIW, IIRC the “bundle values in a single parameter” predates the demise >> of __getslice__. It probably was meant fo

[Python-ideas] Re: Pickle security improvements

2020-07-18 Thread Wes Turner
Tragic! Pickle is relatively (?) fast and could be made more secure while making any performance regression due to additional security optional. Perhaps it is the objectives of pickle which are desirable: - serialize/deserialize arbitrary objects - binary representation Or perhaps the docs cou