From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21244 invoked by alias); 5 Feb 2010 11:12:53 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 21233 invoked by uid 22791); 5 Feb 2010 11:12:52 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: References: <36a35d480908230835s661fdbc2r3844a95c212a8fb@mail.gmail.com> Date: Fri, 05 Feb 2010 11:12:00 -0000 Message-ID: <36a35d481002050312q4fb943fdifbfe872b128a3af5@mail.gmail.com> Subject: Re: [RFC][2/5] Event and event registry From: Oguz Kayral To: Tom Tromey Cc: archer@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2010-q1/txt/msg00068.txt.bz2 Hi, On 21 September 2009 23:55, Tom Tromey wrote: >>>>>> "Oguz" =3D=3D Oguz Kayral 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. =C2=A0Is there a drawback to doing th= is? > > 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