# 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"
Bobo and Principia (Web Techniques, Feb 1999)
Related Reading
More Insights
INFO-LINK
To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy. | |