On 7/27/10 9:02 AM, Guido van Rossum wrote:
Therefore I think the LINQ approach, which (IIUC) converts an expression into a parse tree when certain syntax is encountered, and calls a built-in method with that parse tree, would be a fresh breath of air. No need deriding it just because Microsoft came up with it first.
I've occasionally wished that we could repurpose backticks for expression literals:
expr = `x + y*z` assert isinstance(expr, ast.Expression)
And triple backticks for blocks of statements:
block = ``` try: frobnicate() except FrobError: print("Not on my watch!") ``` assert isinstance(block, ast.Module)
Too bad backticks look like grit on Tim's monitor!