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: [Archer] Re: [RFC][2/5] Event and event registry


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

For some reason, I missing the start of this conversation, so apologies
if I'm a off track in my answer.

FWIW, I agree that using a new type with attributes is more pythonic.
In the end, it's fairly equivalent anyway, but writing stop_event.stop_reason
seems easier than stop_event["stop_reason"].  I assume that the list
of attributes is statically known, so there is no risk of collision like
there was with Values (we discussed the idea of providing access to
struct/union fields via attributes, but there was a risk of collision
with the other attributes of class GDB.Value).

-- 
Joel


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