possible to return dynamic arrays

This commit is contained in:
David Halter
2012-08-22 11:44:45 +02:00
parent 9c09de6245
commit d85184d387
5 changed files with 142 additions and 8 deletions

View File

@@ -89,3 +89,19 @@ class Counter:
for c in Counter(3, 8):
#? int()
print c
# -----------------
# tuples
# -----------------
def gen():
if a:
yield 1, ""
else:
yield 2, 1.0
a, b = next(gen())
#? int()
a
#? str() float()
b