This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][2/5] Event and event registry


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]