public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Oguz Kayral <oguzkayral@gmail.com>
Cc: Tom Tromey <tromey@redhat.com>, archer@sourceware.org
Subject: Re: [Archer] Re: [RFC][2/5] Event and event registry
Date: Fri, 05 Feb 2010 11:31:00 -0000	[thread overview]
Message-ID: <20100205113120.GC4347@adacore.com> (raw)
In-Reply-To: <36a35d481002050312q4fb943fdifbfe872b128a3af5@mail.gmail.com>

> 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

  reply	other threads:[~2010-02-05 11:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-23 15:35 Oguz Kayral
2009-09-21 21:55 ` Tom Tromey
2009-09-23 23:28   ` Richard Ward
2009-09-25 18:37     ` Tom Tromey
2010-02-05 11:12   ` Oguz Kayral
2010-02-05 11:31     ` Joel Brobecker [this message]
2010-02-10 22:45     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100205113120.GC4347@adacore.com \
    --to=brobecker@adacore.com \
    --cc=archer@sourceware.org \
    --cc=oguzkayral@gmail.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).