Ejemplo n.º 1
0
Archivo: a.py Proyecto: int3l/explains
def f(b: B) -> None:
    b.say_hello()
Ejemplo n.º 2
0
Archivo: t.py Proyecto: int3l/explains
from a import A
from b import B

a_inst = A()
b_inst = B()
a_inst.foo(b_inst)
Ejemplo n.º 3
0
def A():
    print("a")
    B()
Ejemplo n.º 4
0
 def foo(self, b: B) -> int:
     return 2 * b.baz()
Ejemplo n.º 5
0
point = 0.2
tiret = point * 3

espaceElement = point
espaceLettre = point * 3
espaceMot = point * 7 - espaceLettre

message = raw_input('Que voulez-vous dire ? ')

for x in message:
    if x.upper() == 'A':
        A()
        sleep(espaceLettre)

    elif x.upper() == 'B':
        B()
        sleep(espaceLettre)

    elif x.upper() == 'C':
        C()
        sleep(espaceLettre)

    elif x.upper() == 'D':
        D()
        sleep(espaceLettre)

    elif x.upper() == 'E':
        E()
        sleep(espaceLettre)

    elif x.upper() == 'F':
Ejemplo n.º 6
0
from b import A, B

print(A(), B())
Ejemplo n.º 7
0
if __name__ == "__main__":

    # from a import A
    from b import B
    # from c import C
    # c = C()
    b = B()

    b.m2_a("value......")
Ejemplo n.º 8
0
from b import A, B

<warning descr="'a' is 'Final' and could not be reassigned">A().a</warning> = 3
<warning descr="'b' is 'Final' and could not be reassigned">B().b</warning> = 3

class C(B):
    def __init__(self):
        super().__init__()
        <warning descr="'B.b' is 'Final' and could not be reassigned">self.b</warning> = 4

    def my_method(self):
        <warning descr="'B.b' is 'Final' and could not be reassigned">self.b</warning> = 5

<warning descr="'B.b' is 'Final' and could not be reassigned">C().b</warning> = 6
Ejemplo n.º 9
0
def test_04_custom_in_class():
    app_conf_path = Path().cwd() / 'app_config1.py'
    assert app_conf_path.is_file(), 'missing config file ' + str(app_conf_path)
    os.environ["APP_CONFIG_MODULE"] = str(app_conf_path)
    b1 = B()
    b1.print_conf()
Ejemplo n.º 10
0
 def run(self):
     print("A: It's your name? %s" % self._name)
     B.hello()
Ejemplo n.º 11
0
 def __init__(self):
     B.__init__(self)
     C.__init__(self)
     print("D in initiated")
Ejemplo n.º 12
0
    def __init__(self):

        flBook = open("b.txt", 'r')
        for line in flBook:
            bk = line.split('|')
            call_number = bk[0]
            title = bk[1]
            subject = bk[2]
            author = bk[3]
            description = bk[4]
            publication = bk[5]
            city = bk[6]
            year = bk[7]
            series = bk[8]
            notes = bk[9]
            self.listMedia.append(
                B(call_number, title, subject, author, description,
                  publication, city, year, series, notes))
        flBook.close()

        flFilm = open("f.txt", 'r')
        for line in flFilm:
            fm = line.split('|')
            call_number = fm[0]
            title = fm[1]
            subject = fm[2]
            director = fm[3]
            notes = fm[4]
            year = fm[5]
            self.listMedia.append(
                F(call_number, title, subject, director, notes, year))
        flFilm.close()

        flVideo = open("v.txt", 'r')
        for line in flVideo:
            vd = line.split('|')
            call_number = vd[0]
            title = vd[1]
            subject = vd[2]
            description = vd[3]
            distributor = vd[4]
            notes = vd[5]
            series = vd[6]
            label = vd[7]
            self.listMedia.append(
                V(call_number, title, subject, description, distributor, notes,
                  series, label))
        flVideo.close()

        flPeriodic = open("p.txt", 'r')
        for line in flPeriodic:
            pd = line.split('|')
            call_number = pd[0]
            title = pd[1]
            subject = pd[2]
            author = pd[3]
            description = pd[4]
            publisher = pd[5]
            publishingHistory = pd[6]
            series = pd[7]
            notes = pd[8]
            relatedTitles = pd[9]
            otherFormsOfTitle = pd[10]
            govtDocNumber = pd[11]
            self.listMedia.append(
                P(call_number, title, subject, author, description, publisher,
                  publishingHistory, series, notes, relatedTitles,
                  otherFormsOfTitle, govtDocNumber))
        flPeriodic.close()