2016-12-08 | Paul Boddie | file changeset files shortlog | Added support for closing files and streams. Made the low-level write operation return the number of bytes written, also declaring the IOError that can be raised. |
paul@340 | 1 | class C: |
paul@340 | 2 | def f(self): |
paul@340 | 3 | return 1 |
paul@340 | 4 | |
paul@340 | 5 | def C_f(): |
paul@340 | 6 | return 2 |
paul@340 | 7 | |
paul@340 | 8 | def C__f(): |
paul@340 | 9 | return 3 |
paul@340 | 10 | |
paul@340 | 11 | c = C() |
paul@340 | 12 | print c.f() |
paul@340 | 13 | print C_f() |
paul@340 | 14 | print C__f() |