TGTGInsighttelegram intelligenceLIVE / telegram public index
← djangoproject
djangoproject avatar

TGINSIGHT POST

Post #435

@djangoproject

djangoproject

Views119Post view count
PostedSep 709/07/2017, 01:47 PM
Post content

Post content

https://www.python.org/dev/peps/pep-0498/ #Interpolation # Python supports multiple ways to format text strings. # These include %-formatting, # str.format(), # and string.Template # The !s, !r, and !a conversions are not strictly required. # Because arbitrary expressions are allowed inside the #f_strings, # this code: »> a = 'some string' »> f'{a!r}' "'some string'" Is identical to: »> f'{repr(a)}' "'some string'" Similarly, !s can be replaced by calls to #str() and !a by calls to #ascii().