[Python-ideas] Backtick expression: similar to a shorter lambda syntax

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jan 22 02:44:55 EST 2019

Calvin Spealman wrote:
> The one positive I see is that because there is no open and closing pair 
> of backticks, like parens or brackets, you can't easily nest this syntax 
> and I actually like how it inherently discourages or makes that impossible!

Perhaps surprisingly, the backtick syntax in Python 2 actually is
nestable, despite beginning and ending with the same character.

Python 2.7 (r27:82500, Oct 15 2010, 21:14:33)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> `'a'+`2+3``


More information about the Python-ideas mailing list