summaryrefslogtreecommitdiff
path: root/test/input/func_noerror_overloaded_operator.py
blob: 4e29946c3b7b6c8f4443ffe6fb7ebe707e0f2210 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# pylint: disable=C0111,R0903,print-statement
"""#3291"""
__revision__ = 1

class Myarray(object):
    def __init__(self, array):
        self.array = array

    def __mul__(self, val):
        return Myarray(val)

    def astype(self):
        return "ASTYPE", self

def randint(maximum):
    if maximum is not None:
        return Myarray([1, 2, 3]) * 2
    else:
        return int(5)

print randint(1).astype() # we don't wan't an error for astype access