Some problems with classes

ssecorp circularfunc at
Mon Sep 1 04:43:01 CEST 2008

class Animal(object):
    def __init__(self, name, weight): = name
        self.weight = weight

    def speak(self):
        print "speak"

class Vegetable(object):
    def __init__(self, name, volume): = name
        self.volume = volume

    def split(self):
        print "tjoff"

class Vegan(Animal, Vegetable):
    def __init__(self, name, attacks): = name
        self.attacks = attacks

More information about the Python-list mailing list