2009-10-27 | Paul Boddie | file changeset files shortlog | Added tests for attribute deletion, currently disallowed. Added notes about attribute usage optimisation effects. |
paul@59 | 1 | #!/usr/bin/env python |
paul@59 | 2 | |
paul@59 | 3 | def f(a, b, *c): |
paul@229 | 4 | return c |
paul@59 | 5 | |
paul@229 | 6 | r1 = f(1, 2, 3) |
paul@229 | 7 | r2 = f(1, b=2) |
paul@229 | 8 | r3 = f(1, 2, 3, 4) |
paul@59 | 9 | |
paul@256 | 10 | result_0 = len(r2) |
paul@256 | 11 | result_1 = len(r1) |
paul@256 | 12 | result_2 = len(r3) |
paul@256 | 13 | result_3 = r1[0] |
paul@256 | 14 | result_4 = r3[1] |
paul@59 | 15 | |
paul@59 | 16 | # vim: tabstop=4 expandtab shiftwidth=4 |