> On 4 Nov, 2017, at 11:43 AM, Peter Ludemann via Python-Dev > <[email protected]> wrote: > > If type annotations are treated like implicit lambdas, then that's a first > step to something similar to Lisp's "special forms". A full generalization of > that would allow, for example, logging.debug to not evaluate its args unless > debugging is turned on (I use a logging.debug wrapper that allows lambdas as > args, and evaluates them if debugging is turned on).
Interestingly enough, at Facebook we found out that using f-strings is *faster*
at runtime than the lazy form of logging.log("format with %s and %d", arg1,
arg2), including for cases when the log message is not emitted.
- Ł
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
