From: Andrew Burgess <aburgess@redhat.com>
To: Tom Tromey <tom@tromey.com>,
Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 0/4] Python API: Accept named arguments in a few more places
Date: Thu, 06 Apr 2023 15:11:11 +0100 [thread overview]
Message-ID: <87ile9ayo0.fsf@redhat.com> (raw)
In-Reply-To: <87mt3na3v0.fsf@tromey.com>
Tom Tromey <tom@tromey.com> writes:
>>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Andrew> As this function takes two arguments I though that accepting named
> Andrew> arguments might be a nice improvement.
>
> We actually document this.
>
> Functions and methods which have two or more optional arguments allow
> them to be specified using keyword syntax. This allows passing some
> optional arguments while skipping others. Example:
> 'gdb.some_function ('foo', bar = 1, baz = 2)'.
>
> Andrew> Then for completeness I updated the other two methods in py-unwind.c
> Andrew> that also didn't accept named arguments, even though these functions
> Andrew> only take a single argument I think taking named arguments is in
> Andrew> general better, and consistency is good too.
>
> It seems reasonable to me; certainly doesn't hurt anything.
>
> This all looks fine to me. Thanks for doing it.
>
> Reviewed-By: Tom Tromey <tom@tromey.com>
Pushed.
Thanks,
Andrew
prev parent reply other threads:[~2023-04-06 14:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 12:10 Andrew Burgess
2023-03-30 12:10 ` [PATCH 1/4] gdb/python: have UnwindInfo.add_saved_register accept named args Andrew Burgess
2023-03-30 14:08 ` Eli Zaretskii
2023-04-06 14:10 ` Andrew Burgess
2023-03-30 12:10 ` [PATCH 2/4] gdb/python: have PendingFrame methods accept keyword arguments Andrew Burgess
2023-03-30 14:13 ` Eli Zaretskii
2023-03-30 12:10 ` [PATCH 3/4] gdb/python: convert Frame.read_register to take named arguments Andrew Burgess
2023-03-30 14:10 ` Eli Zaretskii
2023-03-30 12:10 ` [PATCH 4/4] gdb/python: allow Frame.read_var to accept " Andrew Burgess
2023-03-30 14:11 ` Eli Zaretskii
2023-04-04 18:39 ` [PATCH 0/4] Python API: Accept named arguments in a few more places Tom Tromey
2023-04-06 14:11 ` Andrew Burgess [this message]
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=87ile9ayo0.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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).