Hi Filippo, Thanks for the review, and sorry it took me so long to get back to this.
On Sat, Jan 30, 2010 at 08:10:39PM +0100, Filippo Giunchedi wrote: > 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? I'd rather not spam everyone upgrading this package, but yeah, the change might not be very nice, depending on whether people commonly use deb822 on non-utf-8-encoded files. I'll write up a news entry and post back here for review. > A couple of tests added just for catching regressions would be good also. That, and an encoding option for Deb822.iter_paragraphs ... Oops. I'll try to come up with some tests to exercise the encoding stuff. > > :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 Fixed, thanks. :) -- John Wright <[email protected]> -- http://lists.alioth.debian.org/mailman/listinfo/pkg-python-debian-discuss
