[Python-ideas] Re: Non-standard evaluation for Python

2019-07-14 Thread Nima Hamidi
Andrew Barnert wrote: > On Jul 14, 2019, at 13:46, Nima Hamidi ham...@stanford.edu... wrote: > > Andrew Barnert wrote: > > But in your proposal, wouldn’t this have to be > > written as dt[price < > > 1]? I think the cost of putting the expression in ticks is at least

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-14 Thread Nima Hamidi
Andrew Barnert wrote: > (Re-sending, because this was originally a reply to an off-list message by > Nima > Hamidi) > On Jul 13, 2019, at 14:12, Nima Hamidi ham...@stanford.edu... wrote: > > > > Sometimes it's necessary not to evaluate the expression. Two such

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-14 Thread Nima Hamidi
Thank you very much for your feedback! I'm convinced that backtick is a bad choice for doing this. What about something like q"x"? It resembles other python syntaxes like b"x" or f"x". ___ Python-ideas mailing list -- python-ideas@python.org To unsubscr

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-14 Thread Nima Hamidi
ly a reply to an off-list message > by Nima Hamidi) > > On Jul 13, 2019, at 14:12, Nima Hamidi > <mailto:ham...@stanford.edu>> wrote: >> >> Sometimes it's necessary not to evaluate the expression. Two such >> applications

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-13 Thread Nima Hamidi
ds, f() %>% g() is equivalent to g(f()). This is pretty useful for long pipelines. The way that it works is that the operator %>% changes AST and then evaluates the modified expression. In this example, evaluating g() is undesirable. From: Andrew Barnert Date: Saturday, July 13, 2019 at 4

[Python-ideas] Non-standard evaluation for Python

2019-07-13 Thread Nima Hamidi
Hello all, I would like to briefly share my thoughts on non-standard evaluation (NSE), why this is useful, and how, potentially, it can be added to Python. In most languages, functions have access only to the *value* of their arguments, and not to the expressions that yielded those values. Howeve