This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA][python] Add gdb.Value.string method.
El miÃ, 04-02-2009 a las 12:45 -0700, Tom Tromey escribiÃ:
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>
> >> > +If the optional @var{encoding} argument is given, it must be a string
> >> > +naming the encoding of the string in the @code{gdb.Value}.
>
> 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 left the paragraph about the errors argument untouched.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center