Skip to content

Commit e1e49d8

Browse files
committed
some fix
1 parent 52c4b65 commit e1e49d8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# my_print(*args, sep=', ')
1+
print("==> my_print(*args, sep=', ')")
22
my_print(1, '2', 3.0, True, [None, ('a', 'b')])
33

44
a = [i for i in range(5)]
55
my_print(*a, sep=' | ')
66

7-
8-
# my_print_kw(sep='=', **kwargs)
7+
print("==> my_print_kw(**kwargs)")
98
my_print_kw(a=1, b='2', c=3.0, d=True)
9+
print()
1010
my_print_kw(a=1, b='2', c=3.0, d=True, sep=': ')

examples/06 Bind Variadic Function/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ static bool my_print(int argc, py_Ref argv) {
2828
static bool my_print_kw_dict_apply(py_Ref key, py_Ref value, void *ctx) {
2929
const char *sep = (const char *)ctx;
3030
if (!py_str(key)) return false;
31-
printf("%s=", py_tostr(key));
31+
printf("%s=", py_tostr(py_retval()));
3232
if (!py_str(value)) return false;
33-
printf("%s%s\n", sep, py_tostr(value));
33+
printf("%s%s\n", sep, py_tostr(py_retval()));
3434
return true;
3535
}
3636

0 commit comments

Comments
 (0)