Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches@sourceware.org, tromey@redhat.com, dje@google.com
Subject: Re: [RFC/Patch] Call overloaded operators to perform valid Python operations on struct/class values.
Date: Sat, 21 Dec 2013 08:21:00 -0000	[thread overview]
Message-ID: <83ppoqaa2k.fsf@gnu.org> (raw)
In-Reply-To: <CAGyQ6gzMxiWMCYxYDvyWDfXVxfe3_Yy=6uzOyVyJ9XO+8QU5YA@mail.gmail.com>

> Date: Fri, 20 Dec 2013 14:29:36 -0800
> From: Siva Chandra <sivachandra@google.com>
> Cc: Tom Tromey <tromey@redhat.com>, Doug Evans <dje@google.com>
> 
> I do not think there was an agreement on whether to have this feature
> or not. Based on the points raised by Doug, my personal opinion is
> that we should have this feature along with the facility (which in my
> opinion is a cool fallback when no other Pythonic way works) suggested
> by Doug.  To keep the discussion moving for both the ideas, I am
> sending a patch which addresses the nits pointed out by Doug on my
> first patch.  I will hopefully find time during the holidays to work
> on the feature suggested by Doug.

Thanks.

> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -42,6 +42,9 @@
>    ** Line tables representation has been added.
>    ** New attribute 'parent_type' for gdb.Field objects.
>    ** gdb.Field objects can be used as subscripts on gdb.Value objects.
> +  ** Valid Python operations on gdb.Value objects representing
> +     structs/classes invokes the corresponding overloaded operators if
> +     available.      ^^^^^^^

"invoke", in plural.

> +Python operations can also be performed on @code{gdb.Value} objects
> +representing @code{struct}s/@code{class}es.  For such cases, the

These tricks don't look good in print, due to changes in typefaces.
Suggest to rephrase

  representing a @code{struct} or a @code{class}.

> +                                         which has an overloaded
> +operator defined for the @code{+} operator

"which overloads the @code{+} operator" sounds better, and is surely
shorter and more concise.

The documentation parts are OK with those changes.


  reply	other threads:[~2013-12-21  8:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02 19:28 Siva Chandra
2013-12-06  6:25 ` Doug Evans
2013-12-06 14:20   ` Siva Chandra
2013-12-11 20:18     ` Tom Tromey
2013-12-11 20:17   ` Tom Tromey
2013-12-16  7:48     ` Doug Evans
2013-12-16 22:24       ` Siva Chandra
2013-12-18 16:37         ` Doug Evans
2013-12-18 23:15           ` Siva Chandra
2013-12-19 14:11             ` Doug Evans
2013-12-19 17:50               ` Siva Chandra
2013-12-20 22:29                 ` Siva Chandra
2013-12-21  8:21                   ` Eli Zaretskii [this message]
2013-12-30 14:40                     ` Siva Chandra
2013-12-30 17:57                       ` Eli Zaretskii
2014-01-22 21:39                       ` Siva Chandra
2014-01-25 18:45                         ` Doug Evans

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=83ppoqaa2k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.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