This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA][python] Add gdb.Value.string method.


> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]