From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29257 invoked by alias); 10 Feb 2010 22:45:33 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 29238 invoked by uid 22791); 10 Feb 2010 22:45:32 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org From: Tom Tromey To: Oguz Kayral Cc: archer@sourceware.org Subject: Re: [RFC][2/5] Event and event registry References: <36a35d480908230835s661fdbc2r3844a95c212a8fb@mail.gmail.com> <36a35d481002050312q4fb943fdifbfe872b128a3af5@mail.gmail.com> Reply-To: Tom Tromey Date: Wed, 10 Feb 2010 22:45:00 -0000 In-Reply-To: <36a35d481002050312q4fb943fdifbfe872b128a3af5@mail.gmail.com> (Oguz Kayral's message of "Fri, 5 Feb 2010 13:12:44 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2010-q1/txt/msg00077.txt.bz2 >>>>> "Oguz" =3D=3D Oguz Kayral writes: Tom> It seems to me that we could just define that an event is a dictionary, Tom> rather than introducing a new type. =C2=A0Is 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