Skip to content

Commit f4bf065

Browse files
committed
tests: Add testcases for "complicated" args to generator functions.
1 parent 5f4a667 commit f4bf065

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/basics/generator-args.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@ def gen(v=5):
55
yield i
66

77
print(list(gen()))
8-
# Still not supported, ditto for *args and **kwargs
9-
#print(list(gen(v=10)))
8+
print(list(gen(v=10)))
9+
10+
11+
def g(*args, **kwargs):
12+
for i in args:
13+
yield i
14+
for k, v in kwargs.items():
15+
yield (k, v)
16+
17+
print(list(g(1, 2, 3, foo="bar")))

0 commit comments

Comments
 (0)