# Acquisition of a phone number

import Acquisition

# define empty classes that use acquisition
class Location(Acquisition.Implicit): pass
class Individual(Acquisition.Implicit): pass

# create home, work and me objects
home=Location()
home.phone="555-1212"
work=Location()
work.phone="123-4567"
me=Individual()

# locate me at home
home.resident=me
print home.resident.phone  # prints "555-1212"

# locate me at work
work.worker=me
print work.worker.phone  # prints "123-4567"