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


>>>>> "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


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