Skip to content

Commit f7817ab

Browse files
committed
WIP
1 parent 71b6f70 commit f7817ab

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

slides.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,33 @@ template = t"Hello, {friend}!" # 😊
117117
```
118118
````
119119

120+
---
121+
122+
# T-strings **aren't** _quite_ like jinja
123+
124+
<div v-click><p>They're <strong>eagerly evaluated</strong></p></div>
125+
126+
<div v-click><p>You do <i>not</i> keep calling <code>format()</code> or <code>render()</code> on them</p></div>
127+
128+
<div v-click><p>Naming is hard (<i>sorry</i>!)</p></div>
129+
130+
---
131+
132+
# T-strings **aren't** _quite_ like jinja <span class="slide-count">(2)</span>
133+
134+
````md magic-move
135+
```python314
136+
def greeting(name: str) -> Template:
137+
return t"Hello, {name}!"
138+
```
139+
```python314
140+
def greeting(name: str) -> Template:
141+
return t"Hello, {name}!"
142+
143+
template_1 = greeting("Paul")
144+
template_2 = greeting("Dave")
145+
```
146+
````
120147

121148

122149
---
@@ -627,10 +654,5 @@ str(element)
627654

628655
---
629656

630-
# Thanks!
631-
632-
Q&A
633-
634-
I'm **Dave Peck**.
657+
# Flask and t-strings!
635658

636-
You can find me at **davepeck.org**

0 commit comments

Comments
 (0)