This is the mail archive of the
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: <email@example.com><firstname.lastname@example.org><email@example.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Oguz" == Oguz Kayral <firstname.lastname@example.org> 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.