Bug#495272: [PATCH 2/2] deb822: Better support for non-ascii values

Filippo Giunchedi filippo at debian.org
Sat Jan 30 19:10:39 UTC 2010


Hi John,
thanks for your work!

On Thu, Jan 28, 2010 at 06:41:03PM -0700, John Wright wrote:
> This patch changes Deb822Dict to give back only unicode values.  That
> class (and the Deb822 subclass) now takes an encoding argument, which
> defaults to "utf-8", and specifies how incoming strings are to be
> interpreted.  Likewise, the dump method takes an optional encoding
> argument to specify how to encode the unicode objects back to byte
> strings before writing out to a file (and it defaults to the encoding
> the object was initialized with).

looks generally good to me. Do you think this change warrants a NEWS entry?

A couple of tests added just for catching regressions would be good also.

>          :param _parsed: internal parameter.
> +
> +        :param encoding: When parsing strings, interpret them in this encoding.
> +            (All values are given back as unicode objects, so an encoding is
> +            necessary in order to properly interpet the strings.)

"interpret" typo

filippo
-- 
Filippo Giunchedi - http://esaurito.net - 0x6B79D401

UNIX is simple, but it just takes a genius to understand the simplicity.
-- Dennis Ritchie





More information about the pkg-python-debian-maint mailing list