On Fri, Jun 12, 2020 at 4:55 AM Eric Wieser <wieser.eric+nu...@gmail.com> wrote:
> > He thought that the change of del he proposed will give him that > behavior, but this is not true. > > Unless I'm forgetting part of the conversation, that's not true. Note that > the numpy patch is merged. Today, you get the optimization with `z = a + b > + c + d`. What you don't get is the same optimization if you use: > ``` > ab = a + b > abc = ab + c > z = abc + d > ``` > The language feature I propose is to allow you to _keep_ the optimization > that was present in `z = a + b + c + d`, but write it as > ``` > ab = a + b > abc = (del ab) + c > z = (del abc) + d > ``` > But does that mean that typing `del x` at the REPL will print the value of `x`? That seems wrong. If `del x` is an expression that returns the value of `x` (and then unbinds it), then the REPL would seem to have no choice but to print the returned value -- the REPL has no indication that it came from `del`. -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/5H7H6VYVHHSLARQM34U7ONMYRVKCQJSK/ Code of Conduct: http://python.org/psf/codeofconduct/