From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24599 invoked by alias); 28 Aug 2013 18:14:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24589 invoked by uid 89); 28 Aug 2013 18:14:21 -0000 Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 28 Aug 2013 18:14:21 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KHOP_THREADED,NO_RECEIVED,RDNS_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: ausc60ps301.us.dell.com X-LoopCount0: from 10.170.28.41 From: To: CC: , Subject: Re: [patch] [python] PR python/15461 (gate architecture calls) Date: Wed, 28 Aug 2013 18:14:00 -0000 Message-ID: References: <521DE761.6010403@redhat.com> <87d2oxvgye.fsf@fleche.redhat.com> In-Reply-To: <87d2oxvgye.fsf@fleche.redhat.com> Content-Type: text/plain; charset="us-ascii" Content-ID: <1FC55AC176328844ABC7D5DBF6F08DC3@dell.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg00848.txt.bz2 On Aug 28, 2013, at 1:54 PM, Tom Tromey wrote: > Phil> Something I thought about is not allowing gdb.Architecture to be > Phil> instantiated directly, but I could not think of a clean way to do > Phil> this. >=20 > Did you think of any way? > It seems like a good thing to prevent. Ditto for all the existing types for which direct instantiation doesn't do = anything useful. I haven't tried this, but judging from the Python docs, if you point the tp= _new field of the type object to a function that sets a suitable Python exc= eption, that should do the job. paul