Ejemplo n.º 1
0
class Dog:
    #
    # create a Lumpy object
    lumpy = Lumpy()
    # capture reference state
    lumpy.make_reference()

    a = 10
    b = 20

    def __init__(self, name, color):
        self.name = name
        self.color = color

    def speak_identity(self, name):
        print(self.name)
        print(self.color)
        print(self)
        print(name)

    # draw the current state (relative to the reference state)
    lumpy.object_diagram()
Ejemplo n.º 2
0
"""

from swampy.Lumpy import Lumpy


def b(z):
    prod = a(z, z)
    print z, prod
    return prod


def a(x, y):
    x = x + 1
    lumpy.object_diagram()
    return x * y


def c(x, y, z):
    total = x + y + z
    square = b(total)**2
    return square


lumpy = Lumpy()
lumpy.make_reference()

x = 1
y = x + 1
print c(x, y + 3, x + y)