Re: [Python-Dev] Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-02 Thread Victor Stinner
Le vendredi 31 mai 2019, Simon Cross a écrit : > As the maintainer of Genshi, ... > The new CodeType.replace will remove some potential sources of breakages in the future, so thank you very much for adding that. Hi Simon, You're welcome :-) Genshi was one of my motivation to add CodeType.replace

Re: [Python-Dev] [PEP 558] thinking through locals() semantics

2019-06-02 Thread Random832
On Wed, May 29, 2019, at 01:25, Nick Coghlan wrote: > Having a single locals() call de-optimize an entire function would be > far from ideal. What if there were a way to explicitly de-optimize a function, rather than guessing the user's intent based on looking for locals and exec calls (both of

Re: [Python-Dev] [PEP 558] thinking through locals() semantics

2019-06-02 Thread MRAB
On 2019-06-02 13:51, Steven D'Aprano wrote: On Sun, Jun 02, 2019 at 11:52:02PM +1200, Greg Ewing wrote: Armin Rigo wrote: >You have the occasional big function that benefits a lot from being >JIT-compiled but which contains ``.format(**locals())``. There should be a lot less need for that now t

Re: [Python-Dev] [PEP 558] thinking through locals() semantics

2019-06-02 Thread Steven D'Aprano
On Sun, Jun 02, 2019 at 11:52:02PM +1200, Greg Ewing wrote: > Armin Rigo wrote: > >You have the occasional big function that benefits a lot from being > >JIT-compiled but which contains ``.format(**locals())``. > > There should be a lot less need for that now that we have f-strings. I think you'r

Re: [Python-Dev] [PEP 558] thinking through locals() semantics

2019-06-02 Thread Greg Ewing
Armin Rigo wrote: You have the occasional big function that benefits a lot from being JIT-compiled but which contains ``.format(**locals())``. There should be a lot less need for that now that we have f-strings. -- Greg ___ Python-Dev mailing list Py

Re: [Python-Dev] [PEP 558] thinking through locals() semantics

2019-06-02 Thread Armin Rigo
Hi, On Wed, 29 May 2019 at 08:07, Greg Ewing wrote: > Nick Coghlan wrote: > > Having a single locals() call de-optimize an entire function would be > > far from ideal. > > I don't see what would be so bad about that. The vast majority > of functions have no need for locals(). You have the occasi

Re: [Python-Dev] obmalloc (was Have a big machine and spare time? Here's a possible Python bug.)

2019-06-02 Thread Antoine Pitrou
On Sun, 2 Jun 2019 00:56:52 -0500 Tim Peters wrote: > > But because O is only trying to deal with small (<= 512 bytes) > requests, it can use a very fast method based on trivial address > arithmetic to find the size of an allocated block by just reading it > up from the start of the (4K) "pool" t

Re: [Python-Dev] PEP 595: Improving bugs.python.org

2019-06-02 Thread Ezio Melotti
On Sat, Jun 1, 2019 at 11:50 AM Antoine Pitrou wrote: > > On Fri, 31 May 2019 11:58:22 -0700 > Nathaniel Smith wrote: > > On Fri, May 31, 2019 at 11:39 AM Barry Warsaw wrote: > > > > > > On May 31, 2019, at 01:22, Antoine Pitrou wrote: > > > > > > > I second this. > > > > > > > > There are curr