[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Nathaniel Smith
On Mon, May 17, 2021 at 6:18 AM Mark Shannon wrote: > 2. Repeated binary operations on the same line. > > A single location can also be clearer when all the code is on one line. > > i1 + i2 + s1 > > PEP 657: > > i1 + i2 + s1 > > > Using a single location: > > i1 + i2 + s1 > ^

[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Brandt Bucher
Ethan Furman wrote: > On 5/17/2021 6:13 AM, Mark Shannon wrote: > > Where i1, i2 are integers and s1 is a string. > > > i1 + i2 + s1 > > > Wouldn't the carets just be under the i2 + s1 portion? I don't think so, since this is executed as `((i1 + i2) + s1)`. Mark's carets look correct

[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Ethan Furman
On 5/17/2021 6:13 AM, Mark Shannon wrote: > Where i1, i2 are integers and s1 is a string. > i1 + i2 + s1 > Wouldn't the carets just be under the i2 + s1 portion? -- ~Ethan~ ___ Python-Dev mailing list -- python-dev@python.org To unsubscr

[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Christopher Barker
> > The cost I'm concerned about is the runtime cost of worse code, because > > the compiler can't perform some optimizations due the constraints of > > providing the extended debug information. Python does have an Optimized mode (-O). Granted, it’s not used very often, but this would be a good u

[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Ammar Askar
> The cost I'm concerned about is the runtime cost of worse code, because > the compiler can't perform some optimizations due the constraints of > providing the extended debug information. Aah thanks for clarifying, I see what you mean now. In cases like this where the compiler is making optimizat

[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Mark Shannon
Hi, On 17/05/2021 5:22 pm, Ammar Askar wrote: >> While nicer locations for errors is great, it won't be popular if it has >> a negative impact on performance. >> Locations need to tracked through the compiler. > > In performance sensitive contexts won't most code be pre-compiled into > pyc files

[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Ammar Askar
> While nicer locations for errors is great, it won't be popular if it has > a negative impact on performance. > Locations need to tracked through the compiler. In performance sensitive contexts won't most code be pre-compiled into pyc files anyway? I feel like the performance cost of accurate col

[Python-Dev] Re: Speeding up CPython

2021-05-17 Thread Diego Peres
Recently I found cinder on GitHub created by Instagram , looks like they have the same interest of yous (speed up cpython) and might be useful team up with them. ``` We've made Cinder publicly available in order to facilitate conversation about potentia

[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Pablo Galindo Salgado
P.S. We will add "using a single caret" to the "rejected ideas section" with some rationale. On Mon, 17 May 2021, 14:28 Pablo Galindo Salgado, wrote: > Hi Mark, > > Thanks for your useful feedback. Some comments: > > > 1. Errors spanning multiple lines. > > That is addressed. Check the latest v

[Python-Dev] Re: Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Pablo Galindo Salgado
Hi Mark, Thanks for your useful feedback. Some comments: > 1. Errors spanning multiple lines. That is addressed. Check the latest version of the PEP: we are propising storing the end lines as well: https://www.python.org/dev/peps/pep-0657/#specification > 2. Repeated binary operations on the

[Python-Dev] Critique of PEP 657 -- Include Fine Grained Error Locations in Tracebacks

2021-05-17 Thread Mark Shannon
Hi everyone, I fully agree with the rationale for the PEP, better error messages always help. However, I think the proposed implementation could be misleading in some cases and wastes memory. Use one position, not one-and-a-half positions. --- The

[Python-Dev] Re: Speeding up CPython

2021-05-17 Thread Abdur-Rahmaan Janhangeer
A really awesome book, i was proposing a by the house training. The community is awesome, just some more twerkings needed as you always see the lost beginner wanting mentorship, the contributors contributing and the core-devs having no time to cater for a whole community of mentorship seekers. Kin

[Python-Dev] Re: Speeding up CPython

2021-05-17 Thread Abdur-Rahmaan Janhangeer
On Thu, May 13, 2021 at 10:03 PM Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > *Creating* plausible issues is hard work, I assure you as a university > professor. Coming up with "exercises" that are not makework requires > expertise in both the domain and in educational psyc

[Python-Dev] Re: PEP 659: Specializing Adaptive Interpreter

2021-05-17 Thread gopinathinchennai01
The related code that generates this bytecode https://www.credosystemz.com/training-in-chennai/best-python-training-in-chennai/ ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.