|
16 | 16 | print("Single Str WithoutError Return %r" % oneStrResult)
|
17 | 17 |
|
18 | 18 | ############### Single WithError Return ##############
|
19 |
| -errorFalseResult = multireturn.SingleWithErrorFunc(False) |
20 |
| -print("Single WithError(False) Return %r" % errorFalseResult) |
| 19 | +errorFalseResult1 = multireturn.SingleWithErrorFunc(False) |
| 20 | +print("Single WithError(False) Return %r" % errorFalseResult1) |
21 | 21 |
|
22 | 22 | try:
|
23 |
| - errorTrueResult = multireturn.SingleWithErrorFunc(True) |
| 23 | + errorTrueResult1 = multireturn.SingleWithErrorFunc(True) |
24 | 24 | print("Failed to throw an exception")
|
25 | 25 | except RuntimeError as ex:
|
26 |
| - print("Single WithError(True). Exception:%r" % ex) |
| 26 | + print("Single WithError(True). Exception: %r" % ex) |
27 | 27 |
|
28 | 28 | ############### Double WithoutError Return ##############
|
29 |
| -twoResults = multireturn.DoubleWithoutErrorFunc() |
30 |
| -print("Double WithoutError Return (%r, %r)" % twoResults) |
| 29 | +twoResults = multireturn.DoubleWithoutErrorFunc1() |
| 30 | +print("Double WithoutError(Without String) Return (%r, %r)" % twoResults) |
| 31 | + |
| 32 | +twoResults = multireturn.DoubleWithoutErrorFunc2() |
| 33 | +print("Double WithoutError(With String) Return (%r, %r)" % twoResults) |
31 | 34 |
|
32 | 35 | ############### Double WithError Return ##############
|
33 | 36 | try:
|
34 | 37 | value400 = multireturn.DoubleWithErrorFunc(True)
|
35 | 38 | print("Failed to throw an exception. Return (%r, %r)." % value400)
|
36 | 39 | except RuntimeError as ex:
|
37 |
| - print("Double WithError(True). exception Return %r" % ex) |
| 40 | + print("Double WithError(True). Exception: %r" % ex) |
38 | 41 |
|
39 | 42 | value500 = multireturn.DoubleWithErrorFunc(False)
|
40 | 43 | print("Double WithError(False) Return %r" % value500)
|
|
48 | 51 |
|
49 | 52 | ############### Triple With Error Return ##############
|
50 | 53 | try:
|
51 |
| - (value900, value1000, errorTrueResult) = multireturn.TripleWithErrorFunc(True) |
| 54 | + (value900, value1000) = multireturn.TripleWithErrorFunc(True) |
| 55 | + print("Triple WithError(True) Return (%r, %r, %r)" % (value900, value1000)) |
52 | 56 | except RuntimeError as ex:
|
53 |
| - print("Triple WithError(True). exception Return %r" % ex) |
| 57 | + print("Triple WithError(True) Exception: %r" % ex) |
54 | 58 |
|
55 | 59 | (value1100, value1200) = multireturn.TripleWithErrorFunc(False)
|
56 | 60 | print("Triple WithError(False) Return (%r, %r)" % (value1100, value1200))
|
57 | 61 |
|
58 | 62 | ############### Triple Struct Return With Error ##############
|
59 |
| -(ptr1300, struct1400, errorTrueResult) = multireturn.TripleWithStructWithErrorFunc(True) |
60 |
| -print("Triple WithError(True) Return (%r, %r, %r)" % (ptr1300.P, struct1400.P, errorFalseResult)) |
| 63 | +try: |
| 64 | + (ptr1300, struct1400) = multireturn.TripleWithStructWithErrorFunc(True) |
| 65 | + print("Triple WithError(True) Return (%r, %r)" % (ptr1300.P, struct1400.P)) |
| 66 | +except RuntimeError as ex: |
| 67 | + print("Triple WithError(True) Exception: %r" % ex) |
61 | 68 |
|
62 |
| -(value1500, value1600, errorFalseResult) = multireturn.TripleWithStructWithErrorFunc(False) |
63 |
| -print("Triple WithError(False) Return (%r, %r, %r)" % (value1500.P, value1600.P, errorFalseResult)) |
| 69 | +(value1500, value1600) = multireturn.TripleWithStructWithErrorFunc(False) |
| 70 | +print("Triple WithError(False) Return (%r, %r)" % (value1500.P, value1600.P)) |
64 | 71 |
|
65 | 72 | ############### Triple Interface Return Without Error ##############
|
66 | 73 | (interface1700, struct1800, ptr1900) = multireturn.TripleWithInterfaceWithoutErrorFunc()
|
67 |
| -print("Triple WithError(True) Return (%r, %r, %r)" % (interface1700.P, struct1800.P, ptr1900)) |
| 74 | +print("Triple WithoutError() Return (%r, %r, %r)" % (interface1700.Number(), struct1800.P, ptr1900.P)) |
0 commit comments