From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 00C613858434 for ; Thu, 6 Apr 2023 14:11:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00C613858434 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680790277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q3yS7AqFvocL3+dYlcqIx01Vk5CEIhUzVLzhuHiclEM=; b=H6iFNXsLY0kaPzByqNpEZTmGTvo2dSYtUtZVOi9ayzHQ1FqREwO+/cI7Oq/qh71JNPThla 4WgabSbN50Phxqkl+kP7TvAbOVJmePRSEVlUegdKV9kE47jJ/KGgKv9gdwEOWGVNgd+QpM O4t4sQa4E+/LX93/W1j0vzoNUcp/gTQ= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-132-C44GckfuMFCk6c1rxznmXg-1; Thu, 06 Apr 2023 10:11:14 -0400 X-MC-Unique: C44GckfuMFCk6c1rxznmXg-1 Received: by mail-qv1-f71.google.com with SMTP id g14-20020ad457ae000000b005aab630eb8eso18045153qvx.13 for ; Thu, 06 Apr 2023 07:11:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680790274; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=q3yS7AqFvocL3+dYlcqIx01Vk5CEIhUzVLzhuHiclEM=; b=vTo3W3rD4+1+Z23bTYTCKsltxG6xwCps5mArFQyBQcONs2aOabF+oqTIR/5lIY+ids C4dxO7AKrpKFHL/znXf0RYIy6mWdbxg4ZU0y90ubU9N2Yiryzk51AxToqXro9RAifwmF uKRwpMG7wLgKNa2+GiQrd8BKla79BJ/ahMzcaGCNni5dkkjxgzaAzuTyHvsR/D6dnhu5 Wn1X0jybFAql/cRKdmClBdVvJC+/hgSmgLBRGtSQwxHFB03EAqWFhEcKQ13Sg/OhOdTd WS6Lzp2Af86/AXOI5nhjOD332y3J3tjg/OIgr7qgX/3UXLniW9Yvp9UWBfM70cVh+of3 NLkw== X-Gm-Message-State: AAQBX9eU2GgJ5kau1G2L4DDZYdQmlxo9HynNKizZdltxN9QSdoueqzfx 1VfPi3UIf66xc3ihEa6xWzHSMGWJKPUdr7IMuA4+ZhvleUQy3PBWCvtGfu7CnP2NRdFaSJDCQlu mnebMPfEgQe4lqncxyoTjRRtHaVBlnQ== X-Received: by 2002:ad4:4eaf:0:b0:5b4:ccc0:4f60 with SMTP id ed15-20020ad44eaf000000b005b4ccc04f60mr4185744qvb.37.1680790273703; Thu, 06 Apr 2023 07:11:13 -0700 (PDT) X-Google-Smtp-Source: AKy350Yxiz3FYhcdgu1pF96nxjMPB++Im0rB2C7jmMep3aqV+JH6JLPXA0liOINyYSEiBPOvzwwEDQ== X-Received: by 2002:ad4:4eaf:0:b0:5b4:ccc0:4f60 with SMTP id ed15-20020ad44eaf000000b005b4ccc04f60mr4185708qvb.37.1680790273310; Thu, 06 Apr 2023 07:11:13 -0700 (PDT) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id md15-20020a056214588f00b005dd8b9345e8sm523220qvb.128.2023.04.06.07.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 07:11:13 -0700 (PDT) From: Andrew Burgess To: Tom Tromey , Andrew Burgess via Gdb-patches Subject: Re: [PATCH 0/4] Python API: Accept named arguments in a few more places In-Reply-To: <87mt3na3v0.fsf@tromey.com> References: <87mt3na3v0.fsf@tromey.com> Date: Thu, 06 Apr 2023 15:11:11 +0100 Message-ID: <87ile9ayo0.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tom Tromey writes: >>>>>> "Andrew" == Andrew Burgess via Gdb-patches 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 Pushed. Thanks, Andrew