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

Joel Brobecker brobecker@adacore.com
Fri Feb 5 11:31:00 GMT 2010


> 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



More information about the Archer mailing list