Jul 20 01:12:31 CEST
2015
From:
Mike Miller
Subject:
[python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034657.html
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 23
Jul 20 01:12:31 CEST
2015
H
a
v
e
l
o
n
g
w
i
s
h
e
d
p
y
t
h
o
n
c
o
u
l
d
f
o
r
m
a
t
s
t
r
i
n
g
s
e
a
s
i
l
y
l
i
k
e
b
a
s
h
o
r
p
e
r
l
d
o
…
a
n
d
t
h
e
n
i
t
h
i
t
m
e
From:
Mike Miller
Subject:
[python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034657.html
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 24
Jul 20 01:12:31 CEST
2015
H
a
v
e
l
o
n
g
w
i
s
h
e
d
p
y
t
h
o
n
c
o
u
l
d
f
o
r
m
a
t
s
t
r
i
n
g
s
e
a
s
i
l
y
l
i
k
e
b
a
s
h
o
r
p
e
r
l
d
o
…
a
n
d
t
h
e
n
i
t
h
i
t
m
e
From:
Mike Miller
Subject:
[python-ideas] Briefer string format
c
s
s
t
e
x
t
+
f
'
{
n
l
}
{
s
e
l
e
c
t
o
r
}
{
s
p
a
c
e
}
{
{
{
n
l
}
'
https://mail.python.org/pipermail/python-ideas/2015-July/034657.html
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 25
Jul 20 01:12:31 CEST
2015
H
a
v
e
l
o
n
g
w
i
s
h
e
d
p
y
t
h
o
n
c
o
u
l
d
f
o
r
m
a
t
s
t
r
i
n
g
s
e
a
s
i
l
y
l
i
k
e
b
a
s
h
o
r
p
e
r
l
d
o
…
a
n
d
t
h
e
n
i
t
h
i
t
m
e
From:
Mike Miller
Subject:
[python-ideas] Briefer string format
c
s
s
t
e
x
t
+
f
'
{
n
l
}
{
s
e
l
e
c
t
o
r
}
{
s
p
a
c
e
}
{
{
{
n
l
}
'
I
'
v
e
s
e
e
n
o
t
h
e
r
s
m
a
k
e
s
i
m
i
l
a
r
s
u
g
g
e
s
t
i
o
n
s
,
b
u
t
t
o
m
y
k
n
o
w
l
e
d
g
e
t
h
e
y
d
i
d
n
’
t
i
n
c
l
u
d
e
t
h
i
s
p
l
e
a
s
i
n
g
b
r
e
v
i
t
y
a
s
p
e
c
t
.
https://mail.python.org/pipermail/python-ideas/2015-July/034657.html
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 26
Jul 20 01:12:31 CEST
2015
From:
Eric V. Smith
Subject:
Re: [python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034658.html
Jul 20 01:27:42 CEST
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 27
Jul 20 01:12:31 CEST
2015
W
h
a
t
w
o
u
l
d
t
h
i
s
d
o
?
From:
Eric V. Smith
Subject:
Re: [python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034658.html
Jul 20 01:27:42 CEST
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 28
Jul 20 01:12:31 CEST
2015
From:
C. A.
Subject:
Re: [python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034660.html
Jul 20 01:27:42 CEST
Jul 20 01:44:09
CEST
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 29
I
’
m
1
o
n
t
h
e
s
p
e
c
ific
i
d
e
a
,
t
h
o
u
g
h
d
efin
i
t
e
l
y
s
y
m
p
a
t
h
e
t
i
c
t
o
t
h
e
b
r
o
a
d
e
r
c
o
n
c
e
p
t
o
f
s
i
m
p
l
ifie
d
f
o
r
m
a
t
t
i
n
g
o
f
s
t
r
i
n
g
s
.
Jul 20 01:12:31 CEST
2015
From:
C. A.
Subject:
Re: [python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034660.html
Jul 20 01:27:42 CEST
Jul 20 01:44:09
CEST
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 30
Jul 20 01:12:31 CEST
2015
From:
S. D.
Subject:
Re: [python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034669.html
Jul 20 01:27:42 CEST
@mariatta
PYCON CANADA 2017
#PEPtalk
Jul 20 02:43:29
CEST
Jul 20 01:44:09
CEST
Slide 31
I
t
’
s
s
y
n
t
a
c
t
i
c
s
u
g
a
r
f
o
r
a
s
i
m
p
l
e
f
u
n
c
t
i
o
n
c
a
l
l
w
i
t
h
p
e
r
f
e
c
t
l
y
w
e
l
l
d
efin
e
d
s
e
m
a
n
t
i
c
s
d
o
n
’
t
e
v
e
n
h
a
v
e
t
o
m
o
d
i
f
y
t
h
e
s
t
r
i
n
g
l
i
t
e
r
a
l
.
I
’
m
+
1
.
Jul 20 01:12:31 CEST
2015
From:
S. D.
Subject:
Re: [python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034669.html
Jul 20 01:27:42 CEST
@mariatta
PYCON CANADA 2017
#PEPtalk
Jul 20 02:43:29
CEST
Jul 20 01:44:09
CEST
Slide 32
that escalated quickly
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 33
Jul 20 01:12:31 CEST
2015
From:
Guido van Rossum
Subject:
Re: [python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034729.html
Jul 20 01:27:42 CEST
Jul 20 01:44:09
CEST
Jul 20 02:43:29
CEST
Jul 21 08:05:15
CEST
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 34
T
h
a
n
k
s
,
E
r
i
c
!
Y
o
u
’
r
e
a
d
d
r
e
s
s
i
n
g
a
l
l
m
y
c
o
n
c
e
r
n
s
a
n
d
y
o
u
’
r
e
g
o
i
n
g
e
x
a
c
t
l
y
w
h
e
r
e
I
w
a
n
t
e
d
t
h
i
s
t
o
g
o
.
I
h
o
p
e
t
h
a
t
y
o
u
w
i
l
lfin
d
t
h
e
t
i
m
e
t
o
w
r
i
t
e
u
p
a
P
E
P
;
Jul 20 01:12:31 CEST
2015
From:
Guido van Rossum
Subject:
Re: [python-ideas] Briefer string format
https://mail.python.org/pipermail/python-ideas/2015-July/034729.html
Jul 20 01:27:42 CEST
Jul 20 01:44:09
CEST
Jul 20 02:43:29
CEST
Jul 21 08:05:15
CEST
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 35
By: Eric V. Smith
PEP 498:
Literal String Formatting
August 7th, 2015
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 36
By: Eric V. Smith
PEP 498:
Literal String Interpolation
August 7th, 2015
August 30th, 2015
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 37
ready
for pronouncement
PEP 498:
Literal String Interpolation
1
August 7th, 2015
August 30th, 2015
September 5th, 2015
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 38
PEP 498:
Literal String Interpolation
August 7th, 2015
August 30th, 2015
September 5th, 2015
September 7th, 2015
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 39
“The existing ways of formatting are either
error prone
,
inflexible
, or
cumbersome
.”
RATIONALE
@mariatta
PYCON CANADA 2017
#PEPtalk
...
"Make a purchase before
{tomorrow:%Y-%b-%d}
"
)
@mariatta
PYCON CANADA 2017
#PEPtalk
Slide 76
✅
Multi-line S
trings
message = (
f
"Dear
{name}
,"
...
f
"You can win
{prize:.2f}
$"
...
f
"Make a purchase before
{tomorrow}:%Y-%b-%d
"
)
@mariatta
PYCON CANADA 2017
#PEPtalk
bpo-29668
Slide 77
IDLE Needs Syntax Highlighting
bpo-29287
•
Needs separate colorization to make the expression distinct
from the rest of the string.
•
Needs close-brace matching.
•
Would be desirable to have autocompletion as well.
@mariatta
PYCON CANADA 2017
#PEPtalk