blob: ab6d1c97f954b72e9ce12c919be6317cad06ba69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# pylint: disable=missing-docstring,too-few-public-methods
'''Test that a function is considered a method when looked up through a class.'''
class Clazz:
'test class'
def __init__(self, value):
self.value = value
def func(arg1, arg2):
'function that will be used as a method'
return arg1.value + arg2
Clazz.method = func
VAR = Clazz(1).method(2)
|