This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [RFC][2/5] Event and event registry
- From: Tom Tromey <tromey at redhat dot com>
- To: Oguz Kayral <oguzkayral at gmail dot com>
- Cc: archer at sourceware dot org
- Date: Wed, 10 Feb 2010 15:45:15 -0700
- Subject: Re: [RFC][2/5] Event and event registry
- References: <36a35d480908230835s661fdbc2r3844a95c212a8fb@mail.gmail.com><m3eiq0x8sa.fsf@fleche.redhat.com><36a35d481002050312q4fb943fdifbfe872b128a3af5@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Oguz" == Oguz Kayral <oguzkayral@gmail.com> writes:
Tom> It seems to me that we could just define that an event is a dictionary,
Tom> rather than introducing a new type. ÂIs there a drawback to doing this?
Oguz> One thing I tried to achieve was to minimize the use of brackets,
Oguz> quotation marks etc. Assuming we defined an event as a dictionary, if
Oguz> a user wants to reach the stop_reason he will have to use
Oguz> stop_event["stop_reason"]. But in our case he uses
Oguz> stop_event.stop_reason, which I think is more pythonic.
Ok, I see. That does make sense.
Oguz> What do you guys think on this? Maybe we can use a dictionary and find
Oguz> some way to generate proper getters.,
It has been a while since I looked at the patches, but basically what I
would like to avoid is having to make a whole new class every time we
want to add an event.
Tom