Struct usages in Python

Alok Kumar alokkat at gmail.com
Wed May 28 00:13:33 EDT 2008


Dear All,

This might be very basic question for python, but I have been struggling
with it.  Your help will be highly appreciated.

I have a class like below:

class Event():

   def __init__(self, cameraEventType="", zone=99, setDay="",setTime ="",
clrTime=""):

     self.cameraEventType = cameraEventType

     self.zone = zone

     self.setDay = setDay

     self.setTime = setTime

     self.clrTime = clrTime

I want to use array of Event class object in another class like below:

class EventTimeFilter:

   def __init__(self):
           self.event[] = Event()   *# Seems this is not allowed ?? *

Can someone help me how can I use array of Event object in EventTimeFilter
class. I planned to fill array of Event object in EventTimeFilter class
method.

Thanks in advance.

Regards
Alok
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080528/34c13ce0/attachment.html>


More information about the Python-list mailing list