我正在努力解决的更多基本问题......
给出下面的基本代码......人员对象如何将地址“附加”到它。
class Person(object):
def __init__(self, fn, ln):
self.uid = Id_Class.new_id("Person")
self.f_name = fn
self.l_name = ln
class Address(object):
def __init__(self, st, sub):
self.uid = Id_Class.new_id("Address")
self.street = st
self.suburb = sub
s = Person('John', 'Doe')
hm = Address('Queen St.', 'Sydney')