From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4713 invoked by alias); 5 Feb 2009 20:31:45 -0000 Received: (qmail 4699 invoked by uid 22791); 5 Feb 2009 20:31:44 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout5.012.net.il (HELO mtaout5.012.net.il) (84.95.2.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Feb 2009 20:31:34 +0000 Received: from conversion-daemon.i_mtaout5.012.net.il by i_mtaout5.012.net.il (HyperSendmail v2004.12) id <0KEM00H0010LZT00@i_mtaout5.012.net.il> for gdb-patches@sourceware.org; Thu, 05 Feb 2009 22:31:51 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.238.131]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KEM00FOF111XG94@i_mtaout5.012.net.il>; Thu, 05 Feb 2009 22:31:50 +0200 (IST) Date: Thu, 05 Feb 2009 20:31:00 -0000 From: Eli Zaretskii Subject: Re: [RFA][python] Add gdb.Value.string method. In-reply-to: <1233839944.14735.72.camel@localhost.localdomain> To: Thiago Jung Bauermann Cc: tromey@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: References: <1230949647.8380.145.camel@localhost.localdomain> <1233669417.14735.14.camel@localhost.localdomain> <1233839944.14735.72.camel@localhost.localdomain> X-IsSubscribed: yes 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 X-SW-Source: 2009-02/txt/msg00136.txt.bz2 > From: Thiago Jung Bauermann > Cc: Eli Zaretskii , gdb-patches@sourceware.org > Date: Thu, 05 Feb 2009 11:19:04 -0200 > > > Eli> Would every Python programmer know what kind of argument strings can > > Eli> be given for @var{encoding}? If not, perhaps a list or at least a > > Eli> hint where to find such a list would be useful. > > > > We can't list the possible encodings -- not only does the list change > > over time, but users can write their own codecs in Python. > > > > I suggest just hoisting the reference to Python's "string.decode" > > method to an earlier spot in the paragraph. This should be sufficient > > for anybody, use of the string module is common knowledge. > > What about the following, then? > > "If the optional @var{encoding} argument is given, it must be a string > naming the encoding of the string in the @code{gdb.Value}. It accepts > the same encodings as the corresponding argument to Python's > @code{string.decode} method, so the Python codec machinery will be used > to convert the string." I'd add an example, but if you think the above is enough, I won't object.