diff options
| author | Mattias Andrée <maandree@operamail.com> | 2014-03-07 17:27:55 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2014-03-07 17:27:55 +0100 |
| commit | 1d4b341900edffae8a04b0d91402d4c136bfb596 (patch) | |
| tree | 1d24a4a0eee694d72cbf0ac730cfa5a285f39800 /src/test.py | |
| parent | add fsignal (diff) | |
| download | join-python-1d4b341900edffae8a04b0d91402d4c136bfb596.tar.gz join-python-1d4b341900edffae8a04b0d91402d4c136bfb596.tar.bz2 join-python-1d4b341900edffae8a04b0d91402d4c136bfb596.tar.xz | |
add joinmethod
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/test.py')
| -rwxr-xr-x | src/test.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test.py b/src/test.py index 0279f2d..a0125df 100755 --- a/src/test.py +++ b/src/test.py @@ -153,3 +153,21 @@ unjoining(1) unjoining(2) print() + +class C: + def __init__(self, value): + self.value = value + + @joinmethod + @fragment + def f(self, v): + print(' %i' % (self.value + v)) + +f1 = C(1).f +f2 = C(2).f + +print('Testing @joinmethod, expecting 11,22') +f1(10) +f2(20) +print() + |
