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 / astroid / tests / testdata / python3 / data / nonregr.py @ 745

History | View | Annotate | Download (1.08 KB)

1

    
2

    
3
try:
4
    enumerate = enumerate
5
except NameError:
6

    
7
    def enumerate(iterable):
8
        """emulates the python2.3 enumerate() function"""
9
        i = 0
10
        for val in iterable:
11
            yield i, val
12
            i += 1
13

    
14
def toto(value):
15
    for k, v in value:
16
        print(v.get('yo'))
17

    
18

    
19
import imp
20
fp, mpath, desc = imp.find_module('optparse',a)
21
s_opt = imp.load_module('std_optparse', fp, mpath, desc)
22

    
23
class OptionParser(s_opt.OptionParser):
24

    
25
    def parse_args(self, args=None, values=None, real_optparse=False):
26
        if real_optparse:
27
            pass
28
##          return super(OptionParser, self).parse_args()
29
        else:
30
            import optcomp
31
            optcomp.completion(self)
32

    
33

    
34
class Aaa(object):
35
    """docstring"""
36
    def __init__(self):
37
        self.__setattr__('a','b')
38
        pass
39

    
40
    def one_public(self):
41
        """docstring"""
42
        pass
43

    
44
    def another_public(self):
45
        """docstring"""
46
        pass
47

    
48
class Ccc(Aaa):
49
    """docstring"""
50

    
51
    class Ddd(Aaa):
52
        """docstring"""
53
        pass
54

    
55
    class Eee(Ddd):
56
        """docstring"""
57
        pass