2012-05-11 | Paul Boddie | file changeset files shortlog | Added support for loading submodules given as imported names in "from" statements (such as "module" in "from imported_package import module" referring to "imported_package.module"). |
paul@373 | 1 | #!/usr/bin/env python |
paul@373 | 2 | |
paul@373 | 3 | class C: |
paul@373 | 4 | |
paul@373 | 5 | default = 101 |
paul@373 | 6 | |
paul@373 | 7 | def f(self, x=default): |
paul@373 | 8 | return x |
paul@373 | 9 | |
paul@373 | 10 | c = C() |
paul@373 | 11 | result_101 = c.f() |
paul@373 | 12 | result_202 = c.f(202) |
paul@373 | 13 | |
paul@373 | 14 | # vim: tabstop=4 expandtab shiftwidth=4 |