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: Oguz Kayral <oguzkayral at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: archer at sourceware dot org
- Date: Fri, 5 Feb 2010 13:12:44 +0200
- Subject: Re: [RFC][2/5] Event and event registry
- References: <36a35d480908230835s661fdbc2r3844a95c212a8fb@mail.gmail.com> <m3eiq0x8sa.fsf@fleche.redhat.com>
Hi,
On 21 September 2009 23:55, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Oguz" == Oguz Kayral <oguzkayral@gmail.com> writes:
>
> Oguz> An event object contains the details of an occured event (exit code,
> Oguz> breakpoint number, stop reason etc.)
>
> It seems to me that we could just define that an event is a dictionary,
> rather than introducing a new type. ÂIs there a drawback to doing this?
>
> Tom
>
One thing I tried to achieve was to minimize the use of brackets,
quotation marks etc. Assuming we defined an event as a dictionary, if
a user wants to reach the stop_reason he will have to use
stop_event["stop_reason"]. But in our case he uses
stop_event.stop_reason, which I think is more pythonic.
What do you guys think on this? Maybe we can use a dictionary and find
some way to generate proper getters.,
Oguz