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

Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Tue Jan 22 19:30:21 EST 2019

Jonathan Fine writes:

 > > Backtick expressions work exactly like lambdas, except that they
 > > are bound to the instance they are created in every time that
 > > class is used to create one.
 > I would if possible very much like to see some real world examples of
 > Python code, that would benefit by being rewritten to use the new
 > syntax.

Note: the usual way of doing this is to find examples in the standard
library.  It's not perfect, but the stdlib is generally pretty good
code to start with, and is written with a fairly consistent style.
Yes, those two features makes finding syntax that makes the stdlib
more readable a pretty high barrier.


Associate Professor              Division of Policy and Planning Science
http://turnbull.sk.tsukuba.ac.jp/     Faculty of Systems and Information
Email: turnbull at sk.tsukuba.ac.jp                   University of Tsukuba
Tel: 029-853-5175                 Tennodai 1-1-1, Tsukuba 305-8573 JAPAN

More information about the Python-ideas mailing list