emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: String interpolation


From: Andreas Schwab
Subject: Re: RFC: String interpolation
Date: Thu, 08 Dec 2016 09:27:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Dez 08 2016, Clément Pit--Claudel <address@hidden> wrote:

> Many languages are gaining literal string interpolations features of late 
> (the latest example is Python; see 
> https://www.python.org/dev/peps/pep-0498/).  The TL;DR is that in Python 3.6 
> one can write this:
>
>     value = 1.3
>     print(f'The value is {value + 1:.2f}.')
>
> This prints "The value is 2.30."  Plenty of other languages have similar 
> features.
>
> It would be nice if Emacs offered something similar out of the box.

(format "The value is %.2f." (1+ value))

Andreas.

-- 
Andreas Schwab, SUSE Labs, address@hidden
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]