Statistics
| Revision:

gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / input / func_noerror_function_as_method.py @ 745

History | View | Annotate | Download (388 Bytes)

1
# pylint: disable=R0903
2
'''Test that a function is considered a method when looked up through a class.
3
'''
4
from __future__ import print_function
5

    
6
class Clazz(object):
7
    'test class'
8

    
9
    def __init__(self, value):
10
        self.value = value
11

    
12
def func(arg1, arg2):
13
    'function that will be used as a method'
14
    return arg1.value + arg2
15

    
16
Clazz.method = func
17

    
18
print(Clazz(1).method(2))