summaryrefslogtreecommitdiff
path: root/test/input/func_attrs_definition_order.py
blob: 3c65d736e067fc6a4275a1b7de27f8b5f3a7be1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# pylint: disable=R0903
"""yo"""

__revision__ = '$I$'

class Aaaa(object):
    """class with attributes defined in wrong order"""
    def __init__(self):
        var1 = self._var2
        self._var2 = 3
        print var1

class Bbbb(object):
    """hop"""
    __revision__ = __revision__ # no problemo marge

    def __getattr__(self, attr):
        # pylint: disable=W0201
        try:
            return self.__repo
        except AttributeError:
            self.__repo = attr
            return attr


    def catchme(self, attr):
        """no AttributeError catched"""
        # pylint: disable=W0201
        try:
            return self._repo
        except ValueError:
            self._repo = attr
            return attr