Skip to content

Commit f4fa3fc

Browse files
committed
Few language thoughts
1 parent a675d34 commit f4fa3fc

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

teachprogramming/static/projects/language_features/async-await.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,13 @@ Further reading
9696
---------------
9797

9898
* [How to Use Fetch with async/await](https://dmitripavlutin.com/javascript-fetch-async-await/)
99-
* Concurrent fetches
99+
* Concurrent fetches
100+
101+
102+
---
103+
104+
105+
```python
106+
t.Callable[[URLParams], t.Awaitable[APIPayload]]
107+
```
108+
Explanation of t.Awaitable pattern https://stackoverflow.com/a/59177557/3356840
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
https://peps.python.org/pep-0584/#more-than-one-way-to-do-it
2+
> doesn’t say that there should be Only One Way To Do It. But it does have a prohibition against allowing “more than one way to do it”.
3+
4+
Concatenation operator: a + b
5+
In-place concatenation operator: a += b
6+
Slice assignment: a[len(a):] = b
7+
Sequence unpacking: [*a, *b]
8+
Extend method: a.extend(b)

0 commit comments

Comments
 (0)