Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Some simple classes to test network
- pickling and unpickling
- """
- class Spaceship():
- def __init__(self, name, engines):
- self.name = name
- self.engines = engines
- def info(self):
- return ("I'm a " + self.name +
- " class spaceship and I have "
- + str(self.engines) + " engines")
- class Planet():
- def __init__(self, name, moons):
- self.name = name
- self.moons = moons
- def info(self):
- return ("I'm a planet, my name is "
- + self.name + " and I have "
- + str(self.moons) + " moons")
- class Journey():
- def __init__(self, spaceship, planet):
- self.spaceship = spaceship
- self.planet = planet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement