File: nonregr.py

package info (click to toggle)
python-asttokens 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 624 kB
  • sloc: python: 3,560; makefile: 30
file content (57 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download | duplicates (9)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from __future__ import generators, print_function

try:
    enumerate = enumerate
except NameError:

    def enumerate(iterable):
        """emulates the python2.3 enumerate() function"""
        i = 0
        for val in iterable:
            yield i, val
            i += 1

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


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

class OptionParser(s_opt.OptionParser):

    def parse_args(self, args=None, values=None, real_optparse=False):
        if real_optparse:
            pass
##          return super(OptionParser, self).parse_args()
        else:
            import optcomp
            optcomp.completion(self)


class Aaa(object):
    """docstring"""
    def __init__(self):
        self.__setattr__('a','b')
        pass

    def one_public(self):
        """docstring"""
        pass

    def another_public(self):
        """docstring"""
        pass

class Ccc(Aaa):
    """docstring"""

    class Ddd(Aaa):
        """docstring"""
        pass

    class Eee(Ddd):
        """docstring"""
        pass