File tree 2 files changed +34
-4
lines changed
2 files changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,21 @@ for x in mylist:
23
23
if x == 2:
24
24
mylist.append(99)
25
25
print(x)
26
+ '
27
+
28
+ echo ---
29
+ echo PY comp
30
+
31
+ python3 -c '
32
+ def myappend(li, i):
33
+ if i == 1:
34
+ li.append(99)
35
+ print(i)
36
+ return i
37
+
38
+ mylist = [1,2,3]
39
+ y = [myappend(mylist, i) for i in mylist]
40
+ print(y)
26
41
'
27
42
}
28
43
@@ -95,5 +110,4 @@ compare-mutate() {
95
110
mutate-ysh
96
111
}
97
112
98
-
99
113
" $@ "
Original file line number Diff line number Diff line change @@ -167,7 +167,23 @@ Traditional shells mostly support newline-based records. YSH supports:
167
167
168
168
1 . Length-prefixed records
169
169
1 . Delimiter-based records
170
- - fixed delimiter: newline or ` NUL `
171
- - chosen delimiter: TODO? with regex capture?
170
+ - fixed delimiter: newline or ` NUL `
171
+ - chosen delimiter: TODO? with regex capture?
172
172
1 . Escaping-based records with [ JSON] [ ] and the [ J8 Notation] [ ] extension.
173
- - But we avoid formats that are purely based on escaping.
173
+ - But we avoid formats that are purely based on escaping.
174
+
175
+ [ J8 Notation ] : j8-notation.html
176
+
177
+ ## Appendix
178
+
179
+ ### Notes on HTTP 1.1
180
+
181
+ It has a messy mix of strategies:
182
+
183
+ - The HTTP headers and body are separated by a blank line - a fixed ** delimiter**
184
+ - The ` Content-Length: ` header is a ** length prefix** for the request or
185
+ response body
186
+ - But you can also use ` Transfer-Encoding: chunked ` , which makes the body a
187
+ ** stream** of length-prefixed chunks. The stream is terminated by a sentinel
188
+ (a delimiter).
189
+ - Multipart MIME file uploads use a ** chosen delimiter** to separate files.
You can’t perform that action at this time.
0 commit comments