class Dog:
    """A dog class"""

    def __init__(self, name, weight):
        """Dog constructor""" = name
        self.weight = weight

    def bark(self):
        """Make noise"""
        print("BARK I AM",, "BARK BARK!")

    def eat(self, food):
        """Eat some food.

        Gains one pound for every character in the name of the food.

        :param str food: The name of the food.
        self.weight += len(food)

    def as_dict(self):
        return {"name":, "weight": self.weight}

    def __lt__(self, other):
        return self.weight < other.weight

    def __str__(self):
        return "{0} ({1})".format(, self.weight)

def test_dog():
    frank = Dog("Frank", 75)

    barney = Dog("Barney", 100)

    print("frank < barney:", frank < barney)

    print("barney < frank:", barney < frank)

    print("frank > barney:", frank > barney)

    print("frank >= barney:", frank >= barney)

    s = str(frank)
    print("s:", s)

    print("frank looks like...")

if __name__ == "__main__":