Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 """ | |
2 >>> Foo.incr.__module__ is not None | |
3 True | |
4 >>> Foo.incr.__module__ == Foo.__module__ == bar.__module__ | |
5 True | |
6 >>> Simpleton.incr.__module__ == Simpleton.__module__ == bar.__module__ | |
7 True | |
8 | |
9 """ | |
10 class Foo(object): | |
11 def incr(self,x): | |
12 return x+1 | |
13 | |
14 def bar(): | |
15 pass | |
16 | |
17 | |
18 class Simpleton: | |
19 def __str__(self): | |
20 return "A simpleton" | |
21 | |
22 def incr(self,x): | |
23 """Increment x by one. | |
24 """ | |
25 return x+1 | |
26 | |
OLD | NEW |