Possible to have nested objects?

woc8r@onyx.cs.virginia.edu
Sat, 15 Jan 94 21:37:37 EST

I'm writing a module to provide an interface between Python and a C
toolkit. What I'm noticing is that having nested objects, that is:

class GP_point:
def __init__ (self, location):
self.x, self.y = location

class DeluxeLocatorMeasure:
def __init__ (self, locator):
self.position, self.button_chord, self.button_of_last_transition, self.modifier_chord, self.timestamp=locator

class Event:
def __init__ (self, event):
self.type,self.tempworldLocation,self.relativePixelLocation,self.button,self.keyboard,self.temp_locator=event
self.worldLocation = GP_point(tempworldLocation)
self.locator=DeluxeLocatorMeasure (self.temp_locator)

is giving me problems. If I have an Event object named my_event, I
can reference
my_event.tempworldLocation[0]
but trying to reference
my_event.worldLocation.x
results in the function apparently not running.

Somebody please tell me that I just completely missed something in the
documentation! If you need more information, feel free to ask.

Thanks!
___ ___
\ \ / / -=Bill Carlson=- | "I wanna decide who
\ \/ / | lives and who dies"
\ / INTERNET: woc8r@Virginia.EDU |
\__/ BITNET: woc8r@VIRGINIA | -Crow T. Robot